1 2 3 4 5 6
#!/usr/bin/awk -f ## # Add an SVN $Id$ comment at the end of the comments header /^#/ { aftercom = 1 } !/^#/ && aftercom && ! done { print "# $Id$"; done = 1 } { print }