Re: Making a List out of Terminal "ls" command
Re: Making a List out of Terminal "ls" command
- Subject: Re: Making a List out of Terminal "ls" command
- From: Christopher Nebel <email@hidden>
- Date: Fri, 11 Feb 2005 12:33:40 -0800
On Feb 10, 2005, at 2:58 PM, Doug McNutt wrote:
Terminal.app has a -s switch in which you can specify s meaning
"Return results as AppleScript entities" or something like that.
osascript -s s << END
tell application "Terminal"
get bounds of front window
end tell
END
will return an AppleScript list something like {123, 456, 789, 912}
Perhaps such a call would work with ls. But I donno how to specify -s
in a "do shell script" from the Script Editor.
First, you mean osascript(1), not Terminal. Second, that's not what -s
s does -- read the man page. By default, osascript prints its results
in "human-readable" form, i.e., no quotes around strings, no
backslashing, no braces around lists, and so on. Adding "-s s" means
"print in 'source' form", which is the same thing you see in Script
Editor's result window. This is potentially useful for several things,
but has very little to do with how results are returned from 'do shell
script "ls"'.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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