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 \bazdude \happyI would like to get this output:foo bar bash bazdude happy
How can you combine all lines that end with a backslash character?
text processing;regular expression;quoting;newlines
a shorter and simpler sed solution:sed  ': again/\\$/ {    N    s/\\\n//    t again}' textfileor one-liner if using GNU sed:sed ':x; /\\$/ { N; s/\\\n//; tx }' textfile