in reply to inserting line break
Why shell to sed at all?
while ( <> ) { s/priority /priority\n/; print; }
If you want it all in one line:
perl -i~ -pe 's/priority /priority\n/'
That second when given cos2 as an argument will read the input from cos2, write the output into cos2, and save the original contents as cos2~.
You might want to see s/PATTERN/REPLACEMENT/msixpogce, perlre, perlrun (for the one-liner options), and perltrap which covers traps for people coming from awk, sed, C, and other languages.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: inserting line break
by ddrew78 (Beadle) on Apr 15, 2009 at 16:53 UTC |