adding a filename into a data file

Ian Cameron i.a.cameron at
Mon Nov 5 07:31:18 PST 2012

Tony Edwardson said:


awk '{ print FILENAME " " $0 }' myinputfile.txt

Cheers, Ian.

The Open University is incorporated by Royal Charter (RC 000391), an exempt 
charity in England & Wales and a charity registered in Scotland (SC 038302).

More information about the MiltonKeynes-pm mailing list