View Single Post
04-26-09, 03:33 AM   #5
Verissi
Premium Member
 
Verissi's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2006
Posts: 99
Originally Posted by honem View Post
Doesn't work

I pasted the code into a new script and chmod'd the file.

I execute and it truncates each line with a "r" character ????
Hmm, the shell may be using the slashes and escaping the backslash portion of the carriage return. Try changing the sed command to this and see if it works:
Code:
sed -e 's:$:\r:' $1 > $2
If it still has issues, you can try adding an extra backslash to the above in front of \r (e.g. \\r). Some shells handle things a bit differently and I can't remember which incarnation of "/bin/sh" is used by Macs these days.
  Reply With Quote