shell

Usefull ways of using the shell

diff

diff two files but remove all commented out lines

vimdiff <(grep -v -E '^#|^$' file1) <(grep -v -E '^#|^$' file2)

while loop

Check your dell perc raid controller for progress on rebuild. And email when its ready

true; while [ "$?" -ne "1" ]; do sleep 60; /opt/MegaRAID/perccli/perccli64 /c0 /eall /s15 show rebuild |grep -o "In progress" ;done || mail -s "perc" my@email.nl <<< "Your raid rebuild is ready"