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.
I am being sponsored by Syntress! They bought me an amazing dedicated server to run catonmat on. If you're looking web services, I highly recommend the Syntress guys!
Education Sponsors
I am being sponsored by A-Writer! If you ever need help with essay writing, look no further than A-Writer! They will help you with your writing in as quickly as 3 hours!
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