On Monday 05 February 2007 10:25, Anders Johansson wrote:
> On Monday 05 February 2007 19:15, Jan Karjalainen wrote:
> > How do I go through a text file and add ",on" at the end of each
> > line?
>
> ...
>
> or, if you want to make the changes directly in the file
>
> sed -ie 's/\(.*\)/\1,on/g' testfile
D'Oh!
Well, it's good to learn that sed has an in-place editing option. It's
also nice to know it can optionally make a back-up before overwriting
the original:
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if extension supplied)
RRS
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]