Hey all,
first post here and as im sure once i ask my question.. you will all know that i am very new the shell scripting. I spend all of time in php, not shell.
I need to figure out a way to see if a shell varable has a value in it.
I have
my log files show entry's for $VHOME and $FILE_SIZE and $SIZE, but yet.. my script is saying that $VHOME is empty.
Knowing that my $VHOME has a value.. what am i doing wrong that is making it process the if statement? I have tried $VHOME = '', $VHOME =='', $VHOME eq '', $VHOME eq "".
first post here and as im sure once i ask my question.. you will all know that i am very new the shell scripting. I spend all of time in php, not shell.
I need to figure out a way to see if a shell varable has a value in it.
I have
Code:
SHELL="/bin/sh" import EXT import HOST VPOP="| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox" VHOME=`/home/vpopmail/bin/vuserinfo -d $EXT@$HOST` FILE_SIZE=$SIZE logfile "/var/log/qmail/maildrop.log" set -x log "==== BEGIN maildrop processing for $EXT@$HOST ===" log "Home directory is $VHOME" log "File size $SIZE" if ( $VHOME eq ' ' ) { log "ERROR: VHOME isn't set, falling back to vdelivermail" log "=== EXIT === " to "$VPOP" }
Knowing that my $VHOME has a value.. what am i doing wrong that is making it process the if statement? I have tried $VHOME = '', $VHOME =='', $VHOME eq '', $VHOME eq "".
Comment