![]() |
|
|
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 |
| max size of a group in /etc/group | antalexi | AIX | 4 | 05-11-2008 10:01 AM |
| how i prepare a c++ code(c code) for implementing my own protocol format | amitpansuria | High Level Programming | 1 | 09-07-2007 12:09 AM |
| Monkcast #12: IBM HW group OEMs Solaris to chagrin of SW group & a ... - ZDNet.com bl | iBot | UNIX and Linux RSS News | 0 | 08-17-2007 05:30 PM |
| entry in /etc/group too long - problem using sudo with %group | poli | SUN Solaris | 4 | 12-21-2004 09:50 AM |
| NIS group vs local group | vjsony | UNIX for Dummies Questions & Answers | 3 | 05-19-2003 10:54 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I am trying to find if the entered value is not in a group. Here is my code. Code:
if [ $1 not in ( "LVCH", "LVEI", "LVMI", "LVCH" ) ]
then
echo 'Sid is not in list. Try one of these in caps.'
echo 'LVCH, LVEI, LVMI, LVCH'
exit
fi;
Any Ideas? added code tags for readability --oombera Last edited by oombera; 02-18-2004 at 10:56 AM.. |
|
||||
|
From another dba I work with.
Code:
case $1 in "LVCH"|"LVEI"|"LVMI"|"LVCH") ;; *) echo 'Sid is not in list. Try one of these in caps.' echo 'LVCH, LVEI, LVMI, LVCH' exit ;; esac ![]() added code tags for readability --oombera Last edited by oombera; 02-18-2004 at 10:56 AM.. |
|
||||
|
Another answer
Code:
if [ $1 != "LVCH" ]
then
if [ $1 != "LVEI" ]
then
if [ $1 != "LVMI" ]
then
if [ $1 != "LVCH" ]
then
echo 'Sid is not in list.'
echo 'Try one of these in caps.'
echo 'LVCH, LVEI, LVMI, LVCH'
exit
fi
fi
fi
fi;
added code tags for readability --oombera Last edited by oombera; 02-18-2004 at 10:57 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|