![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ksh scripting help | praveenbvarrier | Shell Programming and Scripting | 1 | 04-15-2008 11:19 AM |
| sql scripting help | sam786 | Shell Programming and Scripting | 3 | 12-10-2007 12:31 PM |
| difference between AIX shell scripting and Unix shell scripting. | haroonec | Shell Programming and Scripting | 2 | 04-12-2006 09:12 AM |
| scripting guru's pls help me with scripting on AIX | thatiprashant | Shell Programming and Scripting | 1 | 01-20-2006 07:58 PM |
| Scripting? | woofie | What's on Your Mind? | 1 | 03-09-2005 07:03 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Scripting help
Hi,
I have an assignment for my Unix class to write a program asking a user to enter a number. the user then chooses an option from a menu of whether they want to count down to zero from the number they entered, or count up from zero to the number. The error i keep getting is binary operator expected for lines 9 and 14 , than when i change that it says unary operator expected. Also I want to know if I coded this whole thing corretly. any ideas? Code:
echo "Enter a number" read $number echo "What do you want to do to this number?" echo "Enter d, to count down to zero" echo "Enter u, to count up from zero" read choice case $choice in d) while [ "$number" \>= "0" ] do echo $number $number = `expr $number - 1` done;; u) while [ "0" \<= "$number" ] do echo $number $number = `expr $number + 1` done;; esac echo "bye" ~ |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|