• 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: How can I perform following task
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • SUL up and running again!
      • From: Emmanuel LEVY <email@hidden>
References: 
 >How can I perform following task (From: Bert Groeneveld <email@hidden>)
 >Re: How can I perform following task (From: LuKreme <email@hidden>)
 >Re: How can I perform following task (From: Bert Groeneveld <email@hidden>)
 >Re: How can I perform following task (From: Bastiaan <email@hidden>)
 >Re: How can I perform following task (From: Bert Groeneveld <email@hidden>)
 >Re: How can I perform following task (From: Bert Groeneveld <email@hidden>)

  • Prev by Date: Re: How can I perform following task
  • Next by Date: SUL up and running again!
  • Previous by thread: Re: How can I perform following task
  • Next by thread: SUL up and running again!
  • Index(es):
    • Date
    • Thread