I have a file with a list of URL's. I need to pass each URL from a bash script to be used in an AppleScript.
while read urls do osascript -e \ 'tell application "Safari" tell window 1 tell current tab to open location "$urls" end tell end tell' done <file.txt
This doesn't work. It passes the literal string
$urls as the location to be opened in Safari. How can I pass the bash variable
$urls to AppleScript?