1 1.1.1.1.4.2 matt #!/bin/sh 2 1.1.1.1.4.2 matt 3 1.1.1.1.4.2 matt # Usage: hchangered oldfile newfile 4 1.1.1.1.4.2 matt 5 1.1.1.1.4.2 matt # hchangered - crude tool to red-color changes in HTML text. Text is 6 1.1.1.1.4.2 matt # also underlined so it shows on monochrome printers. 7 1.1.1.1.4.2 matt 8 1.1.1.1.4.2 matt # Bugs: does not red-color text inside tables. Fascist software may 9 1.1.1.1.4.2 matt # complain about tags being out of order. 10 1.1.1.1.4.2 matt 11 1.1.1.1.4.2 matt diff -e $1 $2 | (sed -n -e ' 12 1.1.1.1.4.2 matt /[ac]$/{ 13 1.1.1.1.4.2 matt p 14 1.1.1.1.4.2 matt a\ 15 1.1.1.1.4.2 matt <font color="red"><u> 16 1.1.1.1.4.2 matt : loop 17 1.1.1.1.4.2 matt n 18 1.1.1.1.4.2 matt /^\.$/b done1 19 1.1.1.1.4.2 matt p 20 1.1.1.1.4.2 matt b loop 21 1.1.1.1.4.2 matt : done1 22 1.1.1.1.4.2 matt a\ 23 1.1.1.1.4.2 matt </u></font>\ 24 1.1.1.1.4.2 matt . 25 1.1.1.1.4.2 matt b 26 1.1.1.1.4.2 matt } 27 1.1.1.1.4.2 matt /d$/{ 28 1.1.1.1.4.2 matt a\ 29 1.1.1.1.4.2 matt i\ 30 1.1.1.1.4.2 matt <font color="red"><u>[DELETED]</u></font>\ 31 1.1.1.1.4.2 matt . 32 1.1.1.1.4.2 matt p 33 1.1.1.1.4.2 matt b 34 1.1.1.1.4.2 matt } 35 1.1.1.1.4.2 matt '; echo '1,$p') | ed - $1 | perl -e ' 36 1.1.1.1.4.2 matt $buf = join("", <STDIN>); 37 1.1.1.1.4.2 matt $buf =~ s/pre>\s+<font/pre><font/g; 38 1.1.1.1.4.2 matt $buf =~ s/font>\s+<\/pre/font><\/pre/g; 39 1.1.1.1.4.2 matt print $buf; 40 1.1.1.1.4.2 matt ' 41