modsiw
asked on
sed - replace backslash linefeed with backslash
sed 's/\\\n/\\/g' doesn't work. What should it be?
ASKER
My command doesn't modify the file at all.
Yours doesn't work; blackslash must be escaped.
Yours doesn't work; blackslash must be escaped.
ASKER
sed 's/\n//g'
doesn't do anything either. I'd expect it to turn the file into a single long line
doesn't do anything either. I'd expect it to turn the file into a single long line
I'd use tr instead
tr -d '\n' <file
sed ':L;$!N;s/\n/\\/g;tL'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try
sed 's/\\n/\/g'