Month: March 2007
Linux
Read More
Diff two files, display the results in two clever colums
diff -y index.php index2.php
Scripting
Read More
Delete all blank lines and save into the file itself
In all files called *.html, delete all blank lines and save into the file itself (-i option): for f in *.html; do sed -i ‘/^ *$/d’ $f; done
Scripting
Read More
Strip HTML tags from file
sed -e ‘s#< [^>]*>##g’ < index.php > index.txt Another way of doing it: sed ‘s/< [^>]*>//g’ < index.php > index.txt