How to pass variables from bash script to AppleScript 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 &lt;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?
This should work:

while read urls
do 
    osascript -e "tell application \"Safari\" to open location \"$urls\""
done&lt;file.txt