Solved

IF..THEN..ELIF conditions

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

Ine of the conditions says:

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

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

Its Korn Shell on AIX
0
Comment
Question by:stummj
3 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 total points
ID: 22634026
Hello stummj,

http://www.cs.princeton.edu/~jlk/kornshell/doc/man93.html#Conditional%20Expressions
-a file
    Same as -e below. This is obsolete.
...
-e file
    True, if file  exists.


Regards,

sunnycoder
0
 
LVL 84

Expert Comment

by:ozo
ID: 22634041
man ksh
man test
0
 

Author Closing Comment

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

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with my python script 6 162
shell script output to log file 9 63
PowerShell Get-Help 10 76
vi editor showing strange character when i hit spacebar everytime 2 65
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…
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

776 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