Using a common command line tool like sed or awk, is it possible to join all lines that end with a given character, like a backslash?
For example, given the file:
foo bar \
bash \
baz
dude \
happy
I would like to get this output:
foo bar bash baz
dude happy
Best Answer
a shorter and simpler sed solution:
or one-liner if using GNU
sed
: