I searched the forums but can't locate an answer to my question...

I’m writing (first time at this) an AS that launches terminal, logs into my hosting provider via SSH and runs a backup script. What I would like to do is once the script is done, have the AS watch for a message my backup script in the host returns and then write that to a log file.

How can I have AS look for a string or text in a terminal window?


Ciao Eric,
in most cases you just have to define a variable that points to the result of a shell script operation:

set theResult to do shell script "ls"
-- instead of the "ls" command you can use any other Unix command

Good scripting