Mailinglist Archive: opensuse (3394 mails)
| < Previous | Next > |
Re: [SLE] dialog and scripting
- From: cjs@xxxxxxx (Carl Johnson)
- Date: Sat, 04 Mar 2000 18:19:58 -0100
- Message-id: <38C161DE.6743405@xxxxxxx>
#!/bin/bash
dialog --menu "The NEO suspend script" 10 40 5 [suspend suspend] [poweroff
poweroff] [reboot reboot]
read ans
if [ "$ans" = "suspend" ]; then
echo suspend > ~/file
else echo $ans > ~/file
fi
Bostjan Muller wrote:
>
> Hi!
>
> I am trying to write a script with dialog, and I can't seem to get it working.
> I don't know what stderr is (that's where the output of dialog is supposed to
> go). I have a menu set up in dalog and a test bash commands after it like this:
> #!/bin/bash
> dialog --menu "The NEO suspend script" 10 40 5 suspend suspend poweroff
> poweroff reboot reboot
> read ans
> if [ "$ans" = "suspend" ]; then
> echo suspend > ~/file
> else echo $ans > ~/file
> fi
>
> The script does nothing - the read just wait's for the input from the user, i
> tried read -e and read -p, but it didn't work either. What do I have to do to
> make the output of dialog readable (or how can I use in a script)?
>
> THX in advance!
>
> Bostjan
> --
> Bo¹tjan Müller [NEONATUS], NEONATUS@xxxxxxxxxxx, http://surf.to/NEONATUS
> RSA id: 0x90178DBD, ICQ #:7506644, PGP key: finger neonatus@xxxxxxxxxxxx
> GEEK CODE = PGP key Registered Linux User #87774, Powered by SuSE Linux 6.2
> "I haven't lost my mind; I know exactly where I left it."
>
> --
> To unsubscribe send e-mail to suse-linux-e-unsubscribe@xxxxxxxx
> For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
> Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
--
Carl Johnson
Sys Admin
cjs@xxxxxxxxxxxxxxxx
|_|
|_|
| |\/--- | |\ | | | \/
| NIKE | | | \| |__| /\
|______| _______________
____ | OH SHIT IT's |
|..| --| LINUX!!! |
|__| |_______________|
|\/| icro$oft "Watch Linux walk all over Micro$oft"
| | /||\
/\
--
To unsubscribe send e-mail to suse-linux-e-unsubscribe@xxxxxxxx
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
| < Previous | Next > |