Re: [MAGNet] OSX text file line break conversion -- s/^M/\r/g

Date view Thread view Subject view Author view

From: Tom Holub (tom@LS.Berkeley.EDU)
Date: Tue Nov 27 2001 - 14:35:11 PST


On Tue, Nov 27, 2001 at 10:16:23AM -0800, Greg Merritt wrote:
>
> I'm sending data files between FileMaker databases and perl
> scripts on an OSX machine. FileMaker dumps data with Macintosh line
> breaks, but perl likes Unix-style line breaks.

perl's pretty flexible actually. You can set the $/ variable
($INPUT_RECORD_SEPARATOR) to whatever you want, or you could have perl
do the substitution itself.

tr is probably the most popular linebreak-fixing command-line tool.

-- 
Tom Holub (tom_holub@LS.Berkeley.EDU, 510-642-9069)
College of Letters & Science
249 Campbell Hall

------------------------------------------------------------------------ The following was automatically added to this message by the list server:

For information about MAGNet, its meetings and events, and its mailing list, including information on subscribing and unsubscribing, see the MAGNet Web site at <http://mac.berkeley.edu/help/magnet/>.


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Nov 27 2001 - 14:36:26 PST