osx - Delete all "\n" occurences with sed -


i delete "\n" (quotes, new line, quotes) in text file.

i have tried: sed 's/"\n"//g' < in > out , sed '/"\n"/d' < in > out non of seds worked.

can tell me doing wrong?

this works gnu sed on linux: don't have mac test with.

sed  '     # reads whole file pattern space     :a; n; $ bb; ba; :b     # *now* make replacement     s/"\n"//g ' <<end 1 two" "three four" 5 "six end 
one twothree four" 5 "six 

this perl command accomplishes same thing:

perl -0777 -pe 's/"\n"//g' 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -