If $1 = "" I get an error, Help:-)
Ben A. Hunsberger
benah at adspp.uucp
Wed Oct 10 01:47:06 AEST 1990
In article <541 at mtndew.Tustin.CA.US> friedl at 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 at adspp.UUCP
Elkhart, IN 46516 | 219-295-4290 (voice) / 219-522-2964 (fax)
More information about the Comp.unix.questions
mailing list