Re: example script want
In a message to me, Ted Harding, you wrote:
|"( Re Message From: Lawrence Chim )
|">
|"> Can someone provides me an example script that insert a line
|"> of text into a text file. The line should be placed below the
|"> line section[xyz] and above the line blahblahblahblah.
|"
|"awk ' {
|" print $0 ;
|" if ( $0 == "section[xyz]" ) { print "new line of text" ; }
|"} '
|"
|"Ted. (Ted.Harding@nessie.mcc.ac.uk)
awk '{ print }
/section\[xyz\]/ { print "new line of text"; }'
--
Ronald van Loon (ronald@and.nl)
"I am waiting as fast as I can! I want patience, and I want it *NOW*!"
- Bethany J. Parkhurst
Reply to: