Re: [OT] UNIX heads; can I do this?
Re: [OT] UNIX heads; can I do this?
- Subject: Re: [OT] UNIX heads; can I do this?
- From: Bill Briggs <email@hidden>
- Date: Wed, 13 Jun 2007 19:24:21 -0300
At 11:16 PM +0200 6/13/07, Emmanuel wrote:
>At 4:54 PM -0300 6/13/07, Bill Briggs wrote:
>>
>>I want to take a text file with Mac (cr) line endings and change to UNIX (lf) line endings (eventually I'm piping it to awk, which needs the lf or it sees it all as one line).
>
>Satimage osax is CR-friendly, its (now more powerful than ever, all syntaxes are implemented now) Regular Expressions can do a lot of work, so while awk is cool when you have LF's in the first place, Satimage osax may be faster for CR-separated files.
I'm sure that's true, and I could have easily written the functionality I need in AppleScript, but I need to provide the functionality in a short shell script.
>Now of course it depends on what mission you have to perform with awk.
Well, I've got a tab delimited file and want to get one of the columns from it. I'm betting that even with the Satimage osax you can't get more terse than this: awk '{ FS = " " } ; {print $3}' b.txt > c.txt
In any case, this episode has to use UNIX tools.
- web
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden