There are several options but this one will work (Assuming bash or sh):
if [ "$2" == "" ]; then
Also, here is a very handy guide I use for those quick lookups when you get rusty. It is avail. in PDF and HTML.
http://personal.riverusers.com/~thegrendel/abs-guide-1.6.tar.bz2
-Chuck
MET wrote:
Simply put, I'm trying to check if $2 is set. Any ideas? if ( ! $2 ) then echo You must set a second file exit 1 fiThe above doesn't work reporting if expression error. Any help would be greatly appreciated. Thanks in advance, ~ MET
-- redhat-list mailing list unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list