[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sed replacement from file



Thx 4 replies all; I ended up taking the perl route because that way, as
long as the expression is in double quotes and not single, I can also
include env variables in the expressions and lines I replace them with.

On Sat, Oct 19, 2002 at 03:39:37AM -0700, Issac Trotts spanked upon the buttocks of Barbie in Morse Code:

You might try this :

perl -pe 's/^replace-this$/line one\nline two\nline three\n/' file1 file2
 or

cat some_file | perl -pe 's/^replace-this$/line one\nline two\nline three\n/'

Oddly enough, perl -ep doesn't work.

-ijt


--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

--
-Stephan
For PGP Public Key, visit:
http://www.sauerburger.org



Reply to: