msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

14 Mar 2007 Generate 100 empty files

for i in $(seq 1 100); do touch test$i; done

Tags:

Posted by

14 Mar 2007 Diff two files, display the results in two clever colums

diff -y index.php index2.php

Tags:

Posted by

14 Mar 2007 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

Tags:

Posted by

14 Mar 2007 Deletes all trailing spaces from each line

sed 's/[ ]*$//' filename

Tags:

Posted by

14 Mar 2007 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

Tags:

Posted by