Ok, now we're in amongst it..
Rex Johnston wrote:
It's a stream editor, not an interactive one. It (usually) edits standard in, and the result appears on standard out. Your editing commands appear in the argument list, such as
sed -e 's/a few/two/' < GNUlinux.txt > Edited.txt
We're proofing Carl's & Rex's commands:
[EMAIL PROTECTED] rik $ cat sedsort.txt fsck ftp find file figner few
[EMAIL PROTECTED] rik $ sed -e 's/a\ few/two/g' < sedsort.txt > sedsort2.txt [EMAIL PROTECTED] rik $ cat sedsort2.txt fsck ftp find file figner few
[EMAIL PROTECTED] rik $ sed -e 's/a few/two/' < sedsort.txt > sedsort2.txt [EMAIL PROTECTED] rik $ cat sedsort2.txt fsck ftp find file figner few
So the correct syntax is:
[EMAIL PROTECTED] rik $ sed -e 's/few/two/' < sedsort.txt > sedsort2.txt [EMAIL PROTECTED] rik $ cat sedsort2.txt fsck ftp find file figner two
Double-check:
[EMAIL PROTECTED] rik $ sed -e 's/figner/finger/' < sedsort.txt > sedsort2.txt [EMAIL PROTECTED] rik $ cat sedsort2.txt fsck ftp find file finger few
Best means of combining?:
[EMAIL PROTECTED] rik $ sed -e 's/figner/finger/' -e 's/few/two/' < sedsort.txt > sedsort2.txt
[EMAIL PROTECTED] rik $ cat sedsort2.txt
fsck ftp find file finger two
- probably better to have been running this: sed -e 's/few/two/' < sedsort.txt > sedsort.txt
Oops!!:
[EMAIL PROTECTED] rik $ sed -e 's/figner/finger/' -e 's/few/two/' < sedsort.txt > sedsort.txt
[EMAIL PROTECTED] rik $ cat sedsort.txt
[is now empty :-/]
Thanks,
- Rik
P.S. Cheers Martin.
How does one open an individual email in vi, short of rummaging through the mailbox folder tree please?
Copy & paste content?
