Re: Interacting with external shell scripts
Re: Interacting with external shell scripts
- Subject: Re: Interacting with external shell scripts
- From: "Anthony Adachi" <email@hidden>
- Date: Mon, 11 May 2009 14:23:25 -0400
I misspoke. I meant to say "do shell script".
I'm sorry, I wasn't clear in my initial post but to clarify, I'm
wondering about interaction possibilities with a external shell script
from within a AppleScript Applet beyond simply invoking the whole shell
script via "do shell script" and getting it's last result.
More specifically, two different types of interactions...
1. Whether or not there are any ways for an AppleScript Applet to talk
to a external shell script as it might with a Stay Open Applet? For
instance, calling specific functions within a running shell script as an
Applet can call specific methods/sub-routines contained in a Stay Open Applet?
2. Or whether it's possible for an AppleScript Applet to call specific
functions within a shell script as it might do if it loaded a
AppleScript library and calling specific methods within that library?
On Mon, 11 May 2009 05:46:44 -0700 Skeeve wrote:
>How would you call "specific declared function" in a shell script from
>commandline?
In bash one can read a library of defined functions into a shell script
via the 'source' command (e.g.- 'source ./function_library.sh'). Then
call those functions.
I received a reply off list which seems to indicate the following would
be the way to invoke specific desired functions contained in a external
shell script library...
do shell script "source path_to_shell_script_function_lib.sh;
do_useful_things_func; do_stuff_func"
I gather one cannot load/source an external shell script function
library just once? In other words, one needs to source it/read it
multiple times from disk throughout the life of the AppleScript Applet,
each time one wishes to invoke the desired functions?
Thanks,
-Anthony
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden