You're viewing a comment by Paul and its responses.

Paul Permalink
July 29, 2009, 16:07

Ref #36. Join a line ending with a backslash with the next line. This joins an arbitrary number of such lines, but breaks (Solaris nawk) at 6144 chars in any merged line.

This works because sub() returns the number of changes it made. No matches is not an error.

awk '{ while (sub (/\\$/, "")) { getline t; $0 = $0 t; } print; }'

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

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