in reply to how to delete part of the line?
perl -ple's/^line\d+=//' infile > outfile
Use double quotes in Windows.
Update: Oops, I forgot about the slashes. That should be
perl -nle's/^line\d+=//; push @l,$_; END { $,=q{/}; print @l }' infile + > outfile
Not nearly as nice a one-liner :(
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to delete part of the line?
by grizzley (Chaplain) on May 22, 2009 at 06:33 UTC | |
by ikegami (Patriarch) on May 22, 2009 at 15:06 UTC | |
|
Re^2: how to delete part of the line?
by yskmonk (Initiate) on May 21, 2009 at 22:33 UTC | |
by ikegami (Patriarch) on May 22, 2009 at 03:37 UTC |