diff files recursively in different directories
August 29, 2008
Leave a comment
for i in `find . -type f | grep -v CVS`; do diff $i ${i/./~/dev_stage/websites/www/v2/share/htdocs};done;
Categories: linux
for i in `find . -type f | grep -v CVS`; do diff $i ${i/./~/dev_stage/websites/www/v2/share/htdocs};done;
Let say we have the following directory structure
cvs add project
find . -type d -print | grep -v CVS | xargs cvs add
find . -type f -print | grep -v CVS | grep “^\.\/” |xargs cvs add
# for i in `seq 1 10`; do mysql -uusername -ppassword database_name -e “SELECT COUNT(*) FROM table$i”;done;
# for i in `echo “table1 table2 table3″`; do mysql -uusername -ppassword database_name -e “SELECT COUNT(*) FROM $i”;done;