Probably you might be better off using "
expect".
Anyway, to enter a literal "ENTER key" open your scripts file in vi.
- Position the cursor where you want to enter the <ENTER> key and use "i" to go into insert mode.
- Then enter <CTRL>-<V>, which makes vi accept the next character as literal. Press the <ENTER> key then, which should result in a "^M" appearing on the screen.
- Press <ESC> to switch back to command mode and save. You're done.
Notice, that "^M" is not two characters (caret and "M"), but one. You will see that when you go over it with the cursor.
I hope this helps.
bakunin