Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyone know whta the -a does in this snippet?

Status
Not open for further replies.

alan147

Technical User
Nov 15, 2002
128
GB
Hello

We have a .profile on our RS 6000 that forces most users to go to a menu when they log in but allows certain users to go to a prompt. This is done with an if statement, it checks wheteher the user is, in the case of the sample below, qa. If they are qa the go to a prompt if not to a menu. My question is what does the -a do in the script?

! "`logname`%" = "qa%" -a \


Thanks

Alan
 
Let's have the preceding & following line or two, too Dickie Bird (:)-)))
 
Dickie

The if statement looks like this:

if [ ! "`logname`%" = "act%" -a ! "`logname`%" = "qa%" -a ! "`logname`%" = "live%" ]
then
TMOUT=7200
export TMOUT
exec act
exit
fi


Alan
 
It means 'and' !
The / is a line continuation
so the statement could be :
if [ ! "`logname`%" = "act%" -a ! "`logname`%" = "qa%" -a ! "`logname`%" = "live%" ]

ie if not like act and not like qa and not like live then do whatever.

Dickie Bird (:)-)))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top