[CLUE-Tech] Bash and password entry

Dave Anselmi anselmi at americanisp.net
Sat Mar 30 08:42:08 MST 2002


Jeffery Cann wrote:

> Matt,
>
> This perl function will do what you want.  It takes three parameters:

> 1.  The prompt text.
> 2.  The default response.
> 3.  Whether to echo the user's response.

The read builtin in bash will prompt for input, with or without echoing.  No
need to use perl if you aren't already.

Interestingly, the batch language in Windows does not seem to have a way to
prompt the user for input.  None, nada, can't be done.  You can write scripts
in Visual Basic, and although it has a way to read terminal input, it doesn't
seem to have a way to supress echoing.  Perhaps I missed it, but I spent a
day looking for something like bash's read.

Dave





More information about the clue-tech mailing list