Re: Fink and 'sh'
Re: Fink and 'sh'
- Subject: Re: Fink and 'sh'
- From: Brennan <email@hidden>
- Date: Mon, 22 Mar 2004 12:58:50 +0100
On 22/3/04 at 11:33, I wrote:
>
However, I can't seem to call 'where' with 'do shell script'.
>
In terminal, 'where where' tells me that 'where' is built in
>
to the shell.
Well, after reading the FAQ, I realised that I could do
do shell script "echo 'where lame' | /bin/tcsh"
... or ...
do shell script "/bin/tcsh -c 'where lame'"
BUT the interesting thing is the error checking. If 'lame' is not found, I
get an error of type 1 (which sounds rather serious but has no useful
string message), rather than error 127 (which is 'command not found'). Is
this anything to be concerned about?
try
set lame to (do shell script "/bin/tcsh -c 'where blah'")
on error msg number n
if n is in {1, 127} then
-- lame not found, do something specific
else -- unexpected exception
error number n
end if
end try
I like to anticipate specific errors. Can I assume an error of type 1
always means that the command isn't found in this context?
Brennan
_______________________________________________
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.