attempting to break within function


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers attempting to break within function
# 8  
Old 03-22-2005
good idea

Good idea, I'll think about doing just that!
Thanks! Smilie
# 9  
Old 03-22-2005
Also, look into using a SELECT CASE statement to build your menu. Its much easier to use than a bunch of echo or print statements.

Example
Code:
select item in item1 item2 item3 item4 exit
do
  case $item in 
    item1) echo "you chose item 1"
              break
              ;;
    item2) echo "you chose item 2"
              break
              ;;
    item3) echo "you chose item 3"
              break
              ;;
    item4) echo "you chose item 4"
              break
              ;;
      exit) echo "Goodbye"
             exit
             ;;
   esac
done

 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Error attempting to run alsamixer

I am working on an embbeded system. On the system in /usr/bin there are a host of programs one of which is called alsamixer. I want to use this utility but whenever I try to run any alsamixer commands I get and error message: Error opening terminal: vt100 Anyone ever seen this error... (10 Replies)
Discussion started by: Circuits
10 Replies

2. Homework & Coursework Questions

C++ Attempting to modify this function to read from a (;) semi-colon-separated file

After some thought. I am uncomfortable issuing my professors name where, there may be unintended side effects from any negative responses/feedback. Willing to re post if I can omit school / professor publicly, but can message moderator for validation? I am here for knowledge and understanding,... (1 Reply)
Discussion started by: briandanielz
1 Replies

3. SuSE

Attempting to use AutoYaST with SLES11SP2

We currently have a setup with SLES11SP1 where we have an AutoYaST ISO set up for automated network installs. I'm attempting to port this to SP2 to make new installs current, but I'm running into a few problems. The process seems the same, and after running mkisofs to build a new SP2 ISO the... (0 Replies)
Discussion started by: Magus Zeal
0 Replies

4. Shell Programming and Scripting

BASH: Break line, read, break again, read again...

...when the lines use both a colon and commas to separate the parts you want read as information. The first version of this script used cut and other non-Bash-builtins, frequently, which made it nice and zippy with little more than average processor load in GNOME Terminal but, predictably, slow... (2 Replies)
Discussion started by: SilversleevesX
2 Replies

5. Debian

attempting to boot from cd rom

i just installed Debian Lenny on HP DL380. After the server rebooted, it still asks for me to insert a cd rom. where can I exactly check the settings for the boot menu? Should it use the hard disk since I didnt insert any cd? pls advise (1 Reply)
Discussion started by: lhareigh890
1 Replies

6. Solaris

Forcing OpenBoot: H/W Solution to no <BREAK> function on USB Serial

Please note: This solution does require some soldering ability. If, like me today, you really really need to get into OpenBoot on a non booting Solaris machine (in my case an Ultra 5) but your USB dongle won't send <BREAK> then here is a -really- simple hardware hack that works a treat: ... (0 Replies)
Discussion started by: HideawayStudio
0 Replies

7. Red Hat

attempting to install chkconfig 1.3.5

Hi there everyone, I'm using redhat 7.3 at the moment and am currently trying to install chkconfig-1.3.5-3.i386.rpm , but when I type this command: rpm -Uvh chkconfig-1.3.5-3.i386.rpm I get the following error: error: failed dependencies: chkconfig = 1.2.24 is needed by... (3 Replies)
Discussion started by: redhat_newb101
3 Replies

8. IP Networking

Error with ifconfig when attempting to switch to 10baseT

In Darwin, when typing "ifconfig en0 media 10baseT/UTP mediaopt half-duplex" I recieve the error message "ifconfig: SIOCSIFMEDIA: Operation not permitted". The same thing occurs when I sudo the command. Any suggestions? Thanks... (1 Reply)
Discussion started by: tkarrde
1 Replies
Login or Register to Ask a Question