Thanks a lot that worked =) ~ Matthew
-----Original Message----- From: [EMAIL PROTECTED] [mailto:redhat-list-admin@;redhat.com] On Behalf Of Cowles, Steve Sent: Tuesday, November 05, 2002 10:49 PM To: '[EMAIL PROTECTED]' Subject: RE: Shell Script Question || Check for set variable > -----Original Message----- > From: MET > Subject: Re: Shell Script Question || Check for set variable > > > I've tried what follows and I still get " if: Expression Syntax ". > > ==== > #!/bin/tcsh > > if [ -z "$2" ] ; then > echo You have not set a file to be appended. > exit 1 > fi > ==== > > Any ideas? Your using tcsh as your CLI, not bash. So the syntax would be different. Try: #!/bin/tcsh if ( ! $2 ) then echo File not found endif If you must use tcsh, then further reading should include man tcsh Steve Cowles -- redhat-list mailing list unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list -- redhat-list mailing list unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list