[Python-Dev] getpass and stdin
Leif Walsh
adlaiff6 at gmail.com
Tue Feb 26 19:20:09 CET 2008
On Tue, Feb 26, 2008 at 1:18 PM, Shaya Potter <spotter at cs.columbia.edu> wrote:
> I want to run a program within a bash script, essentially daemonize a
> program that doesn't have a daemon mode.
>
> #!/bin/sh
>
> echo "What Is Your Passsword: "
> stty_orig=`stty -g`
> stty -echo
> read -r PASSWORD
> stty $stty_orig
>
> TIMEOUT=600
>
> while [ 1 ]
> do
> echo $PASSWORD | program
So...why won't `program -p $PASSWORD' work here?
> sleep $TIMEOUT
> done
--
Cheers,
Leif
More information about the Python-Dev
mailing list