Jump to content
  • entries
  • comments
  • views

About this blog

linux & windows & any other popular os:

tips tricks and general observations on any hardware,os,software and other it related stuff.

-stuff i wish i had come across years ago as it would have made life easier 

-stuff i think everyone knows but proves me wrong everytime

-stuff that is but shouldnt be

-stuff that seems like a nobrainer to me but isnt 

Entries in this blog

Some nice BAT (b-cat) functionallity:colorize [pattern] to STDOUT on the fly [oneliner|script]

#!/usr/bin/env sh READFROM=$1 MATCH=$2 COLOR=$[ 29 + 0$3 ] printf "\nPress \033[1;32m[ctrl]+[c]\033[0m to quit.\n\n" function help() { echo 'USE: $ bwatch [PATH] [STR] [INT]' echo 'PATH : file to watch' echo 'STR : string to watch for' echo 'INT : {0..16} Color (ANSI 29+)' echo ' : eg: 2 = RED 3 = GREEN ,... ' echo 'TIP: use in Terminal with miniview/minimap to quickly spot highlighted content;eg http://terminolo.gy' exit } [[ $1 == -h ]] && help tail -n 5 -f $READFROM | bat


Herr.Hoefkens in bash tricks

first entry linux programs and tools i wish i had known about 10 years ago

Commandline: ccat : a colorized version of cat  use : $cat /etc/fstab # flags = --bg="dark" # has nice feature to output html with --html=true $sensors | ccat --bg="dark" # reading from stdin # notes : to be usefull you should put it as an alias in your ~/.bashrc (or your aliases.bashrc): alias ccat="ccat --bg='dark' -G Decimal='*green*' -G Keyword='blue' -G Punctuation='*yellow*' -G Plaintext='reset' -G String='brown' -G Type='*white*' -G Literal='fuchsia'" $mic


Herr.Hoefkens in bash tricks