Mailinglist Archive: opensuse (2488 mails)
| < Previous | Next > |
Re: [opensuse] Bash script help needed
- From: Jan Karjalainen <jrock@xxxxxxx>
- Date: Mon, 05 Feb 2007 20:01:45 +0100
- Message-id: <45C77F19.2070108@xxxxxxx>
Randall R Schulz wrote:
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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
On Monday 05 February 2007 10:25, Anders Johansson wrote:Somehow all these examples add the ",on" on a new line after each line, like this:
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
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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |