View Single Post
  #4   (View Single Post)  
Old 8th March 2009
gosha gosha is offline
Spam Deminer
 
Join Date: Jun 2008
Location: China
Posts: 256
Default

even more confused now.
In the same file I need to add \\ at the end of each line to use it in latex, in this case I must put the sed command in single quotes, otherwise the same command would give only one back slash:
sed 's/$/\\\\/g' file > newfile (gives expected output)
sed s/$/\\\\/g file > newfile (only adds one backslash)

why?
Reply With Quote