Archive

Archive for the ‘bash’ Category

color grep less

May 25, 2009 varnit Leave a comment

Add this in your bashrc

alias grep='grep --color=always';
alias less='less -R';

Categories: bash, linux

bash for loop through numbers

March 3, 2008 varnit 1 comment

# for i in `seq 1 10`; do mysql -uusername -ppassword database_name -e “SELECT COUNT(*) FROM table$i”;done;

Categories: bash, linux Tags: , ,

bash for loop through text

March 3, 2008 varnit Leave a comment

# for i in `echo “table1 table2 table3″`; do mysql -uusername -ppassword database_name -e “SELECT COUNT(*) FROM $i”;done;

Categories: bash, linux