Applescript variabele gebruiken in bash script

Ik wil een ingevoerde variabele vanuit applescript gaan gebruiken in een bash script dat vanuit applescript wordt aangeroepen.

Iemand een suggestie?

set vara to “”
tell application “Finder”
display dialog “Geef variabele in;” default answer vara buttons {“OK”} default button 1
set ordernr to text returned of the result
end tell

do shell script “/bin/tcsh start.sh | tr a-z A-Z”
of
do shell script “/bin/tcsh start.sh”

Zoiets?

[code:1:437b06ea8b]set dialogResult to display dialog "Geef variabele in;" default answer "" buttons {"OK", "Annuleer"} default button "OK"

if button returned of dialogResult is equal to "Annuleer" then
return false
end if

set promptVar to text returned of dialogResult

set shellResult to do shell script "echo " & quoted form of promptVar[/code:1:437b06ea8b]