The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
problem with if statement equality cleansing_flame Shell Programming and Scripting 1 02-12-2008 10:57 AM
Case statement problem gzs553 UNIX for Advanced & Expert Users 6 11-14-2006 04:24 PM
if statement problem djt0506 UNIX for Dummies Questions & Answers 4 12-04-2005 08:16 PM
problem with an IF statement hcclnoodles Shell Programming and Scripting 2 04-17-2003 11:53 AM
if statement problem coughlin74 UNIX for Dummies Questions & Answers 1 09-27-2001 05:31 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 02-26-2008
LinuxRacr LinuxRacr is offline
Registered User
  
 

Join Date: Aug 2007
Location: DFW, Texas
Posts: 60
If Statement Problem..

The problem I am having here is that only the 1st option is executed, no matter if I pick yes or no. What am I doing wrong? How can I get this working right without resorting to a case statement?

Code:
echo "This is the max size your lvol can be:"
echo $MAXSIZE
echo
echo Do you want to max out the size of your lvol?
print -n "Enter 'y' for Yes or 'n' for No :"
read ANSWER3
if [ $ANSWER3="n" ] || [ $ANSWER3="N" ] || [ $ANSWER3="no" ] || [ $ANSWER3="No" ]
    then
     exit
    else
     continue
fi
if [ $ANSWER3="y" ] || [ $ANSWER3="Y" ] || [ $ANSWER3="yes" ] || [ $ANSWER3="Yes" ]
  then
    echo
    echo "vxassist -g $DISKGROUP growto $LVOL $MAXSIZE"
    vxassist -g $DISKGROUP growto $LVOL $MAXSIZE
    exit
  else
    exit
fi
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0