Below is a portion of code from an Applescript I’m writing. It basically requires a shell script to be embedded in to the Applescript. Currently, the output from the script is saved to a file (>>/Users/Mark/Desktop/output.txt). Is there any way to get the results to go directly in to an Applescript array variable, or reimport the outputted text file in to an array?
Thanks
Mark
do shell script "for ((i=1;i<=31;i+=1)); do
search=\"<string>\"
if [ $i -lt 10 ]; then search=\"<string>0\"; fi
cat /Users/mark/Desktop/tv.xml | grep $search$i\"/\" | tr -d ' <string>' | cut -d \" \" -f 2 | cut -c 1,2,3,4,5 >>/Users/Mark/Desktop/output.txt
done"