• 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: Finding lines containing foo in a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding lines containing foo in a file


  • Subject: Re: Finding lines containing foo in a file
  • From: Deivy Petrescu <email@hidden>
  • Date: Thu, 22 Dec 2005 22:31:45 -0500


On Dec 22, 2005, at 6:39 PM, Stockly, Ed wrote:

set AppleScript's text item delimiters to "|"
set itemstofind to quoted form of ({"32103", "31823", "31679"} as string)
set filepath to quoted form of POSIX path of ((choose file) as Unicode text)
set myShellScript to "tr '\\r' '\\n' < " & filepath & " |" & "egrep " & itemstofind
(do shell script myShellScript)

Ed;

this script works here!
OS 10.4.3
AS 1.10.3


By the way, if you try words that you know you not going to get, the script errors: "the command exited with a non zero status"



Deivy _______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >RE: Finding lines containing foo in a file (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Name of Volume inside a disk image
  • Next by Date: Folder Actions-moving folder window for
  • Previous by thread: RE: Finding lines containing foo in a file
  • Next by thread: How can I set a background image to a Volume ?
  • Index(es):
    • Date
    • Thread