On Sat, Oct 19, 2002 at 03:39:37AM -0700, Issac Trotts wrote:
> 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.
That's not so odd if
On Sat, 19 Oct 2002 05:46:52 -0500
Stephan Sauerburger <[EMAIL PROTECTED]> wrote:
> s/^--sed-replace-here--$/line one\nline two\nline three/
>
> just puts that one line in there with literal "n"'s where I put the \n.
You could do
sed -e 's/^--sed-replace-here--$/line one\
line two\
line three/
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 [EMAIL PROTECTED]
with a subject of "u
3 matches
Mail list logo