Search This Blog

Thursday, February 24, 2011

shell script variables assignment

lastfile=`tail -n 1 mysql-bin.index`
echo $lastfile

mysql backup a table / duplicate a table

mysql> create table compounds_201110223 like compounds;
Query OK, 0 rows affected (0.00 sec)

mysql> insert compounds_201110223 select * from compounds;