Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!wuarchive!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!iuvax!news!cartan!ndmath!nstar!adspp!benah From: benah@adspp.uucp (Ben A. Hunsberger) Newsgroups: comp.unix.questions Subject: Re: If $1 = "" I get an error, Help:-) Message-ID: <669@adspp.uucp> Date: 9 Oct 90 15:47:06 GMT References: <2919@canisius.UUCP> <5434@ptsfa.PacBell.COM> <541@mtndew.Tustin.CA.US> Distribution: usa Organization: MicroAge/Abacus - Elkhart, IN Lines: 21 In article <541@mtndew.Tustin.CA.US> friedl@mtndew.Tustin.CA.US (Steve Friedl) writes: >> Enclose the $1 in "s: >> >> if [ "$1" = "" ] >> > also suggested... > > if [ x"$1" = x"" ] > ok, excuse my ignorance but, wouldn't the following work just as well? if [ -z "$1" ] which is used to test if the variable is zero length? -- Benjamin A. Hunsberger | uunet!rutgers!iuvax!ndmath!nstar!adspp!benah MicroAge/Abacus | uunet!sco!romed!adspp!benah 2707 Middlebury St. | benah@adspp.UUCP Elkhart, IN 46516 | 219-295-4290 (voice) / 219-522-2964 (fax)