![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| check if file is empty | stolz | Shell Programming and Scripting | 8 | 03-22-2009 11:15 PM |
| How to check if a file is empty? | shreekrishnagd | UNIX for Dummies Questions & Answers | 1 | 09-09-2008 09:21 AM |
| [bash] Check if variable is set or blank | noratx | Shell Programming and Scripting | 1 | 03-28-2008 09:42 AM |
| Check for empty string | rahman_riyaz | Shell Programming and Scripting | 12 | 01-24-2008 03:13 AM |
| Check for Empty Command Argument | Nysif Steve | UNIX for Dummies Questions & Answers | 6 | 09-19-2007 04:59 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to check if two variable are empty strings at once? (bash)
I need to check if $1 or $2 are empty before continuing but I don't know if bash has any logic of the sort. This is what I'm looking for - except that "and" doesn't seem to work. Code:
if [ -n "$1" ] and [ -n "$2" ];then ... Thank you!
|
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|