![]() |
|
|
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 |
| checking the value of the variable | aoussenko | Shell Programming and Scripting | 1 | 06-12-2008 10:49 AM |
| ksh Checking if variable has 5 digits | developncode | UNIX for Dummies Questions & Answers | 3 | 04-08-2008 04:57 PM |
| Eliminate variable checking in a script | BMetelsky | Shell Programming and Scripting | 8 | 12-04-2007 10:59 AM |
| checking valid values in variable | MizzGail | Shell Programming and Scripting | 3 | 10-23-2006 04:20 PM |
| checking a variable is within range | Poison Ivy | Shell Programming and Scripting | 2 | 08-17-2006 06:33 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
checking variable has value - ksh
hi all,
i have a shell (ksh) script where i am reading line by line from a grep command and i wanted to check if the grep command actually returned something or was null. i can do this by using -z : if [ -z "$myVariable" ]; then ..... but this forces me to do something when $myVariable is null when i would like to just move on to the next line. how do i do that ?? have tried if [ ! -z "$myVariable" ]; then ..... but it threw some errors. many thanks. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|