Re: How can I perform following task
Re: How can I perform following task
- Subject: Re: How can I perform following task
- From: Bert Groeneveld <email@hidden>
- Date: Thu, 16 Dec 2010 13:45:12 +0100
Hi Lu, thanks, but this doesn't compile. (Expected end of line, etc. but found “|”.)
On 16 dec 2010, at 12:46, LuKreme wrote:
> Fastest way is going to be to grep the file with a do shell script. Something like this:
>
> set myBarCode to "8717545743119"
> set myFile to "/path/to/the/file"
> set myArtNum to do shell script "grep " & myBarCode & " " & myFile | awk '{print $1}'"
>
> (Untested, but something very much like that is going to be fast. Of course, if you need the 3rd field you'd replace $1 with $3.)
_______________________________________________
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