Computing.Net > Forums > Unix > BASH - IF operands missing, SOS.

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

BASH - IF operands missing, SOS.

Reply to Message Icon

Name: aka
Date: April 12, 2007 at 07:31:01 Pacific
OS: WinXP SP2 and AIX
CPU/Ram: 2G's
Product: Dell
Comment:

Hi, hope you´re doing fine....

I was searching over the Internet the IF statements (UNIX-BASH) and/or operands and his meanings, for example:

File Operations
Using the if command, filenames can be tested for the following:

-d filename
true if filename is a directory
-e filename
true if filename exists
-f filename
true if filename is a text file
-o filename
true if you own filename
-r filename
true if filename is readable
-w filename
true if filename is writable
-x filename
true if filename is executable
-z filename
true if filename is empty

But I know there are a lot more I can use and those one who aren’t only for filenames, like –z , -eq , -n and so on….

If you please can tell me under what keyword can I search them in Google or show me the whole list.

10x.


Don´t freak out until you know the facts...Relax...!



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: April 12, 2007 at 10:37:57 Pacific
Reply:

Look at the test MAN page:

http://www.ss64.com/bash/test.html

or for the equality and other shell topics, check out the bash MAN page:

http://www.cs.sunysb.edu/documentat...



0

Response Number 2
Name: aka
Date: April 12, 2007 at 11:25:26 Pacific
Reply:


Thanks a lot Nails, it helped a lot, thats what I was looking for.

10x again....

Don´t freak out until you know the facts...Relax...!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: BASH - IF operands missing, SOS.

Bourne Shell convert bash to sh www.computing.net/answers/unix/bourne-shell-convert-bash-to-sh/6161.html

Programming Practice www.computing.net/answers/unix/programming-practice/4335.html

Unix, Script, If then else www.computing.net/answers/unix/unix-script-if-then-else/6446.html