|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
[Solved] what does this do? if [[ -n "${ENV_VAR}" ]]
Hi Guys! What does this do? Code:
if [[ -n "${ENV_VAR}" ]]what does -n option do here? I can't find the explanation using man test. Thanks in advance!
Last edited by vbe; 06-29-2012 at 11:53 AM.. Reason: code tags |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
-n is a string operator, checking if the given operand size is non zero ... If the case, returns true.
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Because of the double square brackets, this is actually a Conditional Expression not a Test. Therefore the explanation would be in the Conditional Expressions section of the manual for your Shell .
In most modern Shells it's actually the same explanation as Test. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] Need help with HP-UX 11.31 LVM! | zixzix01 | Emergency UNIX and Linux Support !! Help Me!! | 6 | 06-09-2011 05:51 AM |
| Solved: AWK SED HELP | viveksr | Shell Programming and Scripting | 0 | 01-25-2011 01:50 PM |
| [solved] merging two files and writing to another file- solved | mlpathir | Shell Programming and Scripting | 1 | 10-07-2010 06:41 PM |
| can this been solved with awk and sed? | mskcc | Shell Programming and Scripting | 16 | 11-10-2005 11:52 AM |
|
|