You're viewing a comment by Andrey Yazu and its responses.

Andrey Yazu Permalink
January 11, 2016, 17:46


"Unfortunately this one liner fails to join more than 2 lines (this is left as an exercise to the reader to come up with a one-liner that joins arbitrary number of lines that end with backslash :))."

This is simpler and works for multi lines with backslashes:

awk '/\\$/ { sub(/\\$/, ""); printf "%s", $0; next }; 1' file1

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "cdrom_104": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.