Re: Two questions
Re: Two questions
- Subject: Re: Two questions
- From: Christopher Nebel <email@hidden>
- Date: Mon, 8 Jul 2002 12:23:09 -0700
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 Engineering
_______________________________________________
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.