Randall R Schulz wrote:
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
Somehow all these examples add the ",on" on a new line after each line, like this: 208.34.234.48-208.34.234.63 ,on 208.34.235.32-208.34.235.63 ,on etc... I want them to look like this: 208.34.234.48-208.34.234.63,on 208.34.235.32-208.34.235.63,on etc... -- "In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. Van De Snepscheut -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org