On 11/9/11 09:36 , Ed Gronenschild wrote:
> Hi Rudolph,
>
> I used TextEdit. On a Mac with OS version earlier than OS10.6
> this problem didn't occur. With TextEdit it is not possible to save
> as UNIX format.
> Thanks for the trick to use sed.
>
> Ed
>

I'm not a great fan of the built in 'TextEdit'. That having been said, 
did you check under its preferences and make sure that it is setup as 
'plain text' and not 'rich text'? I just tested on my TextEdit (Lion, 
10.7.2) and it saved in <lf> and not <cr> convention.

You might try 'aquamacs' on the Mac... assuming you're an emacs-ish type 
person. It works reasonably well. Another editor is "TextWrangler" 
(available in the Mac OSX App Store for free).  If you look in its 
preferences, under "Text Files" there is an explicit option to save as 
"Classic Mac, UNIX, or Windows". The default is "UNIX".

Oh, and make sure that the 's/x0d/x0a/' are enclosed in single quotes. I 
see that my copy-paste in the earlier email somehow lost the quotes. If 
you have a file called "file1.txt" and want to do the <cr>/<lf> sub and 
save to "file2.txt", the exact command is

        sed 's/0xd/xoa/' file1.txt > file2.txt

HTH


-- 
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
MGH/MIT/HMS Athinoula A. Martinos Center for Biomedical Imaging
149 (2301) 13th Street, Charlestown, MA 02129 USA
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply via email to