1.

How Do I Join Two Lines If Line #1 Ends In A [certain String]?

Answer»

SED -e :a -e '/\$/N; s/\n//; ta' FILE # all seds
sed ':a; /\$/N; s/\n//; ta' file # GNU sed, ssed, HHsed

Note that this replaces the backslash-newline with nothing. You may want to replace the backslash-newline with a single space instead.

sed -e :a -e '/\$/N; s/\n//; ta' file # all seds
sed ':a; /\$/N; s/\n//; ta' file # GNU sed, ssed, HHsed

Note that this replaces the backslash-newline with nothing. You may want to replace the backslash-newline with a single space instead.



Discussion

No Comment Found