I want to run a schell script and send the result to a file but I don’t want the applescript to wait for the shell script to finish. I currently am using this:
do shell script “command >> file_path” but the applescript waits until the command is finished.
I’ve found the Technical Note from Apple: http://developer.apple.com/technotes/tn2002/tn2065.html about how to do this. They suggest:
do shell script “command &> file_path &”
The problem is that file_path is re-written every time, instead of the output being logged to the end of file_path.
I’ve tried variations such as:
do shell script “command &>> file_path” and
do shell script “command >> file_path &”
these do not work, and I do not know enough about shell scripting. I also tried to surround the do shell script command with an ignoring application responses, but that does not work because the command I’m using is “with administrator privileges”. The applescript does not ask for a password and the command will not work.
Does anyone know how to both allow the applescript to contine and log the output of the script command to the end of a file?
Scott