Re: How can I perform following task
Re: How can I perform following task
- Subject: Re: How can I perform following task
- From: LuKreme <email@hidden>
- Date: Thu, 16 Dec 2010 04:46:46 -0700
On 16-Dec-2010, at 04:35, Bert Groeneveld wrote:
> Hope someone can help with a smart piece of code that executes fast (I hope in just a few seconds).
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.)
--
*** Word_of_God was kicked from #christian by SageRider (Please don't
Swear)
_______________________________________________
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