![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help... no idea what to use | dakid | Shell Programming and Scripting | 4 | 03-06-2008 12:57 AM |
| Errors-- Any Idea | jazz21 | Shell Programming and Scripting | 3 | 10-18-2007 02:11 PM |
| any good idea on this? | fedora | Shell Programming and Scripting | 7 | 09-29-2006 03:36 PM |
| Echo escaped \c in SH Shell Any Idea | asami | Shell Programming and Scripting | 4 | 05-04-2006 07:24 AM |
| Limitations of awk? Good idea? Bad idea? | yongho | Shell Programming and Scripting | 2 | 06-08-2005 05:18 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
b-shell: any better idea for this one?Thanks!!
I'm new to the script programming and I have this piece of code (repeatedly used) in my program:
while : do ................ ans=`ckyorn -p "Do you want to continue?"` if [ "$ans" = "n" ] || [ "$ans" = "no" ] || [ "$ans" = "N" ] || [ "$ans" = "NO" ]; then break elif [ "$ans" = "q" ] || [ "$ans" = "Q" ]; then echo "Aborting..." exit 2 # exit code for user choice of aborting fi done It works fine but I wonder if there is a simpler way to write the if block- without detailing each of the conditions. I'm sure there is but don't know what;-) Any advice woulld be highly appreciated. Thanks in advance!! Bluemoon |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|