Re: Shell script problem
Re: Shell script problem
- Subject: Re: Shell script problem
- From: deivy petrescu <email@hidden>
- Date: Sun, 11 Dec 2005 14:39:01 -0500
On Dec 11, 2005, at 14:03, Ronald 'Warui' Becher wrote:
Manfred M. Strasser schrieb:
ls -l -S -F cd /Users/xyz/Desktop/oneFolder/
In the Terminal I get a correct result ... But using this in an
AppleScript ...
do shell script "ls -l -S -F cd " & "/Users/xyz/Desktop/xyz/"
returns an error: "No such directory ..."
What's the bug?
Hello Manfred,
I somehow can't find one and your snippet works with me ... yet
only with existing directories of course ;-)
But I never get an error like the one you describe. If I want to
list a non existing directory the output consists only of double
quotes.
Greetings
Ronald
There is no bug! It does not work in either terminal or shell script.
The difference is that in terminal you get a error and then you the
second command
ls -l -S -F /Users/xyz/Desktop/xyz/
gets executed. The script exits with an error as soon as you try to
ls cd.
Since there is no cd directory you get an error.
By the way Ronald, you are probably doing something wrong if you are
getting it right. :)
Both could check your terminal and you will see the error.
The proper way to write it is:
do shell script "ls -l -S -F ; cd /Users/xyz/Desktop/xyz/"
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