Bash shell help

Victor Odhner plug-devel@lists.PLUG.phoenix.az.us
Thu Apr 24 20:14:03 2003


Carl Parrish wrote:
> in a bash shell how do you just "hit enter?" I've got a script
 > that's supposed to enter a password. In this case I've already
 > used ssh2 and a keygen so I don't need to enter a passwd I just
 > need to "enter" a blank.

The "script" of input to the program in question
may be done with "here files", e.g.,

program <<EOF
EOF
... should send a single newline to "program".

Or use the "printf" command ( /usr/bin/printf ) and pipe it
to the command you're running:

     printf "\n" | program

Just say   program </dev/null  for a null input.

... and so on.

HTH,

Vic