From owner-freebsd-questions Mon May 5 07:14:07 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id HAA26356 for questions-outgoing; Mon, 5 May 1997 07:14:07 -0700 (PDT) Received: from iceberg.anchorage.net. (root@iceberg.anchorage.net [207.14.72.150]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id HAA26350 for ; Mon, 5 May 1997 07:14:04 -0700 (PDT) Received: from aak.anchorage.net (ai-130 [207.14.72.130]) by iceberg.anchorage.net. (8.6.11/8.7.3) with SMTP id FAA12823; Mon, 5 May 1997 05:11:05 -0800 Date: Mon, 5 May 1997 06:04:21 -0800 (AKDT) From: Steve Howe X-Sender: abc@aak.anchorage.net To: Zahemszky Gabor cc: FreeBSD questions , wosch@apfel.de Subject: Re: test -f $shvar In-Reply-To: <199705050827.KAA00520@CoDe.hu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > The programmer must check if the variable `shvar' is > > not empty. E.g.: > > test -n "$shvar" -a -f "$shvar" > I don't know, why isn't it enough: > test -f "$shvar" > Gabor ^^^^^ shell genius! haha! i get into trouble sometimes because i don't like to use quotes more than necessary ... thanks everyone ... -------------------------------------------------------------------------