Multiline processing in sed
Posted by mymuss on July 28, 2008
You want sed to replace backslash-newline to space (i.e. to convert multiline string into a singleline) like this:
param =
val1, \
val2, \
val3
should become
param = val1, val2, val3
The following sed command does the trick
sed -e :a -e '/\\$/N; s/\\\n/ /; ta'
Advertisement