Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Linefeeds showing' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Linefeeds showing
Authored by: Glanz on Oct 23, '02 08:01:28AM

Yes... there is a way! This is a problem of translating formats and is easily solved.

To fix it, type the following commands in the shell very carefully:

% echo alias m2u tr '\015' '\012' >> ~/.cshrc
% echo alias u2m tr '\015' '\012' >> ~/.cshrc

Then type:
% source ~/.cshrc

After, when working with Unix editing tools and you need to fix a Mac format file, use m2u [mac to unix] as follows
% m2u < mac-format-file > unix-friendly-file

And when you're editing a Unix file in a Mac tool and there is carriage return jibberish, use the reverse:
% u2m < unix-friendly-file > mac-format-file

The "tr" command is also helpful. See: "man tr"...



[ Reply to This | # ]