in reply to Not A Rockstar File Manipulator Today

Could you provide your sample input, as well as pattern/replacement inputs? I tried the following:
line1 line2 line3
as the input file, 'line' as the pattern, and 'foo' as the replacement. All my line's get replaced with foo's. Isn't that what you expect?

Replies are listed 'Best First'.
Re^2: Not A Rockstar File Manipulator Today
by koolgirl (Hermit) on Nov 14, 2008 at 22:42 UTC

    OK, well mine was a bit different, but just to see if my input was the problem, I changed the input file to the same as yours, numbered lines. But when I ran it as such, with line as pattern and foo as replacement, the result was a completely empty output file :|. Which is even stranger, to me, because that's the first thing it did, and it makes no sense anyway...I'm gonna need a straight jacket soon...:\