Le Vendredi 14 Novembre 2003 15:43, Fajar Priyanto a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dear All,
> Can we make menu in bash script just like in DOS' batch file?
> Such as:
> =======
> [Menu]
> Pls select what you want to do:
> 1. Copy /etc/dhcpd.conf
> 2. Copy /etc/wvdial.conf
> 3. Make directory /var/log/nullmailer
> 4. Do all of above
> ======
> Could you please give me some examples?
> Thanks
> - --
> Fajar http://linux.arinet.org
> Linux mdk91.sistek.kom 2.4.21-0.13mdk GNU/Linux
> 21:40:27 up 29 min, 10 users, load average: 1.24, 0.62, 0.46
> Quote of the day:
> The package said "requires Microsoft Windows 95 or better" - I don't
> understand why it doesn't work on my pocket calculator!
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
>
> iD8DBQE/tOopMai9kCFqACoRAtDWAKCy9RUiSWb0etqoi/YlcdV/Nm/hBACeMEEl
> Jo1pLp6ZHRCu9/scgqg3CDI=
> =oeuw
> -----END PGP SIGNATURE-----

I don't have much time going in details. but under bash you could use "select" 
like
select i in 'Copy /etc/dhcpd.conf' '2. Copy /etc/wvdial.conf' 'Make directory 
/var/log/nullmailer' 'Do all of above'; do echo $REPLY; done

You could do a case on the $REPLY. Unfortunately this command keeps asking 
until you press Ctrl-D.

Sorry not to have time to explain in more details (type "help select"),
Clement.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to