IF..THEN..ELIF conditions

Posted on 2008-10-03
Last Modified: 2013-12-26
I have inherited some code that I need to understand.

Ine of the conditions says:

if [ condition ]
elfif [condition -a condition ]
 ... something else ...

I assume the -a means logical AND but I cant see that documented anywhere.
Can anyone confirm that please?

Its Korn Shell on AIX
Question by:stummj
LVL 45

Accepted Solution

sunnycoder earned 500 total points
ID: 22634026
Hello stummj,
-a file
    Same as -e below. This is obsolete.
-e file
    True, if file  exists.


LVL 84

Expert Comment

ID: 22634041
man ksh
man test

Author Closing Comment

ID: 31502760
Thanks - I'll re-write it to make it clear for whoever comes along after me.

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sed question 2 122
how to run my script during boot in rhel 7 14 537
cscript to activate Windows and Office? 2 78
WMIC Output Formatting 1 43
Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a recent question ( here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question