AppleScript Primer for Mac OS X
Subject:   terminal script
Date:   2004-02-16 09:02:30
From:   jaharmi
Response to: terminal script

Generally speaking, I don't think there's a good way to use AppleScript scripts to run command line utilities that require user interaction.

You could do the interaction and then pass the results to a command line utility, if it accepts arguments.

For your example, you're really talking more about scripting Terminal (and I'm not sure of the state of that) rather than scripting the command line (with "do shell script" in AS).