User input assigned to variable in AppleScript then passed to "do shell script" command
This assigns the name entered to the variable answer.

display dialog "What's your name?" default answer ""
set answer to text returned of result
display dialog "Your name is " &amp; answer