Fri Apr 1 03:26:52 EST 2005 -- uriel Print the author and the date of the changes in the Wiki/Diff output. Reference: /n/sources/patch/sorry/acme-wiki-diff-author-date Date: Fri Apr 1 02:13:52 CES 2005 --- /acme/wiki/wiki.diff Fri Apr 1 02:11:56 2005 +++ /acme/wiki/wiki.diff Fri Apr 1 02:11:53 2005 @@ -6,7 +6,23 @@ diff -n index.txt $1/index.txt | sed 's/^(.*)index.txt:(.*)index.txt:/\1current:\2:/g' while(! ~ $#* 0 1){ - diff -n $1/index.txt $2/index.txt | sed 's/^(.*)index.txt:(.*)index.txt:/\1:\2:/g' + diff -n $1/index.txt $2/index.txt | awk -F'[\/ :]' ' + $1 ~/^[0-9]+$/ { + getA = "cat "$1"/current | sed -n -e ''1d; /^A/s/^A//p; /^#/q''" + getA | getline A; close getA + $1 = t2d($1) + $5 = t2d($5) + print "\n" A ":\n" $1":"$3" "$4" "$5":"$7 + next + } + { print } + + function t2d(t) { + c = "date "t; c|getline l; close c + split(l, a, "[ :]+") + return a[1]" "a[2]" "a[3]" "a[4]":"a[5]" "a[8]"("t")" + }' shift -} +} + echo clean >/dev/ctl >[2]/dev/null