in reply to why does 'sed' remove the entire line?

You say you do the system command, but you aren't saying when. Considering you're opening several files (and without actually checking whether the open succeeds), it does matter.

Your sed command seems to be correct - when running it from the command like it does what you think it should do.

Of course, I would have written the entire thing in Perl:

use 5.010; open my $in, "<", "sesip1" or die; open my $out, ">", "sesip2" or die; my @lines = <$in>; chomp @lines; { local $" = " "; say $out "dest (@lines)"; } close $out or die;

Replies are listed 'Best First'.
Re^2: why does 'sed' remove the entire line?
by ddrew78 (Beadle) on Jun 10, 2010 at 16:03 UTC
    That worked perfectly, thank you so much.