답변:
기본적으로 파일 내용을 변수로 먼저 읽어야합니다. 이를 수행하는 방법에는 여러 가지가 있습니다.
text=$(< TEXTFILE)
osascript ... "$text"
$(...)
구문으로 대체하십시오
내가 처음 게시 한 질문에 대한 완전한 soloution은 다음과 같습니다.
set listOfCommand to (read POSIX file "path-to/command.txt")
tell application "Terminal"
do script listOfCommand
delay 1
quit
end tell
set listOfShows to (read POSIX file "path-to/dump.txt")
tell application "Safari"
display notification listOfShows with title "Downloads:"
end tell