in reply to Lost in-place file edit code
Like this?
perl -pi.bak -e "s/ /_/;" infile.txt
See perlrun. For an on-site reference, see Re: One Liners (warning, I wrote that node).
Dave
Updated: fixed '-e'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Lost in-place file edit code
by monarch (Priest) on Jun 08, 2005 at 05:37 UTC | |
|
Re^2: Lost in-place file edit code
by GrandFather (Saint) on Jun 08, 2005 at 05:33 UTC | |
by ghenry (Vicar) on Jun 08, 2005 at 05:53 UTC |