in reply to Re: how to delete part of the line?
in thread how to delete part of the line?

Than maybe two simple one-liners?

perl -ple's/^line\d+=//' infile | perl -p0e 's!\n!/!g' > outfile
or
perl -ple's/^line\d+=//' infile | perl -p0e 's!\s+$!! ; s!\n!/!g' > ou +tfile
if end of the output has any meaning. Hmm, seems there is no beauty, too.

Replies are listed 'Best First'.
Re^3: how to delete part of the line?
by ikegami (Patriarch) on May 22, 2009 at 15:06 UTC

    No good. Those replace the trailing newline with a "/". If that was desirable, the following would suffice:

    perl -pl57e"s/^line\d+=//" infile > outfile