• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [OT] UNIX heads; can I do this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: [OT] UNIX heads; can I do this?
      • From: Philip Aker <email@hidden>
References: 
 >Email Change because of SPAM... (Sorry for the RESEND) (From: Don Wieland <email@hidden>)
 >[OT] UNIX heads; can I do this? (From: Bill Briggs <email@hidden>)
 >Re: [OT] UNIX heads; can I do this? (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: [OT] UNIX heads; can I do this?
  • Next by Date: Re: [OT] UNIX heads; can I do this?
  • Previous by thread: Re: [OT] UNIX heads; can I do this?
  • Next by thread: Re: [OT] UNIX heads; can I do this?
  • Index(es):
    • Date
    • Thread