-
Senior Member
registered user
anticuchos,
try this, replace your "if" statements with one big "case", havent worked out the "looping" part, conditional looping is a "structured" way, not quite sure on a way to "unconditionaly" loop, yet...
This way, you can add new entries, by adding a "something)" line, and what to do when that text is entered. The "special" "*)" condition is when "nothing else matches" within the case block...
Code:
#!/bin/bash
echo -n "
How are you feeling?
Tired
Bored
Hungry
Enter: " #Type how you feel
read OPTION
case $OPTION in
tired)
#if $option 'Tire'; then
echo "You should get some rest."
;;
bored)
#if $option 'Bored'; then
echo "Play a game of Frozen Bubble."
;;
hungry)
#If $option 'Hungry'; then
echo "Order pizza!"
;;
*)
echo "Invalid entry: $OPTION!"
;;
esac
Hope this helps,
Ms. Cuddles
Similar Threads
-
By sibtay in forum Customising & Remastering
Replies: 4
Last Post: 10-25-2004, 11:08 AM
-
By dehahn in forum General Support
Replies: 4
Last Post: 10-16-2004, 01:31 AM
-
By Salzi in forum General Support
Replies: 1
Last Post: 09-09-2004, 02:56 AM
-
By Guitarplaya512 in forum General Support
Replies: 5
Last Post: 03-14-2004, 11:03 AM
-
By michaelmontagne in forum General Support
Replies: 1
Last Post: 09-04-2003, 09:17 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Cisco C9200L-24P-4X-E Catalyst 9200L 24-Port PoE+ 4x10G SFP+ Tested
$1499.00

Cisco WS-C3650-12X48UR-L 48-Port Stackable Layer 3 8x10G SFP+ Port Switch
$129.99

Cisco Catalyst C9130AXI-B WiFi 6 802.11ax Wireless Access Point Brand New
$101.99

Cisco Acacia DP04QSDD-E25-840 400G QSFP-DD Coherent DCO Transceiver Module
$699.99

Cisco | N3K-C3232C | 32-Port 100G QSFP Network Switch W/ 2x PSU, 2x Power Cords
$205.00

Cisco Nexus N9K-C92160YC-X 48P 25GbE SFP28 6P QSFP+/QSFP28 PE Switch
$439.00

New Sealed Cisco GLC-LH-SMD 1000BASE-LX/LH SFP Transceiver Module *US
$17.00

Cisco C9300-48UXM-A Switch 9300 Series 48-port UPoE Network
$874.99

NEW Sealed Cisco SFP-10G-LR 10GBASE-LR SFP+ 1310nm 10km *US Shipping*
$24.00

Cisco Catalyst C9120AXI-B Wi-Fi 6 Access Points
$30.00