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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
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