RSS

Category Archives: bash

color grep less

Add this in your bashrc

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

 
Leave a comment

Posted by on May 25, 2009 in bash, linux

 

bash for loop through numbers

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

 
1 Comment

Posted by on March 3, 2008 in bash, linux

 

Tags: , ,

bash for loop through text


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

 
Leave a comment

Posted by on March 3, 2008 in bash, linux

 
 
Follow

Get every new post delivered to your Inbox.