I am trying to figure out how to iterate through a file line by line in AppleScript. Similar to a bash script like so:
for LINE in $(cat file)
do
echo ${LINE}
done
Any tips? Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I can’t take credit for writing this, I lifted the code from a response to a post in the MacRumors forums.
Original code credit to HexMonkey on the MacRumors forum.