Re: Two questions
Re: Two questions
- Subject: Re: Two questions
- From: Paul Skinner <email@hidden>
- Date: Mon, 8 Jul 2002 16:38:08 -0400
Doh! Nevermind.
Gotta watch that wrap.
On Monday, July 8, 2002, at 04:24 PM, Paul Skinner wrote:
So, how would one filter out returns like
'/Applications/Internet/OmniWeb.app/Contents/'?
On Monday, July 8, 2002, at 03:23 PM, Christopher Nebel wrote:
On Monday, July 8, 2002, at 08:50 AM, bill wrote:
Try this method:
do shell script "find / | grep '.app$' > ~/Desktop/ListOfApplications"
Briefly, use shell command find to list every items in root directory
recursively, grep item ends with '.app', send the output to a text
file
named 'ListOfApplications' on your desktop.
<Cough! Sputter!> That's a really horrible abuse of the the "find"
command. "find" supports all sorts of interesting filters so it only
returns the items you care about; making it return absolutely
everything and then piping through "grep" is a waste of resources.
Try this instead:
find / -name "*.app"
For me, it executes in about 2/3 the time. (Of course, "locate" is
still the best, assuming you've got an up-to-date database.) For more
details, read the "find" man page.
--Chris Nebel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.