If you want to do that in a script you would need to have the script parse the output sent back from the ASA in order to send the next command.
You cannot send the commands to the ASA without expecting for the output when you are putting in the enable password on the ASA.
You can use "expect" to do that in Linux.
I hope it helps.
PK