Re: How can I perform following task
Re: How can I perform following task
- Subject: Re: How can I perform following task
- From: Emmanuel LEVY <email@hidden>
- Date: Thu, 16 Dec 2010 15:20:37 +0100
<phewww/>
On Dec 16, 2010, at 2:55 PM, Bert Groeneveld wrote:
Unfortunately this doesn't work as I hoped. myArtNum is always an
empty string.
I will try Emmanuel's solution first.
WHICH WORKS GREAT! Thanks Emmanuel.
------------
On 16 dec 2010, at 13:47, Bastiaan wrote:
Last line of code must be:
set myArtNum to do shell script "grep " & myBarCode & " " & myFile
& "| awk '{print $1}'"
Op 16 dec 2010, om 13:45 heeft Bert Groeneveld het volgende
geschreven:
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
_______________________________________________
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
_______________________________________________
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
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
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