Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jul 2008 22:34:02 +0200
From:      Mel <fbsd.questions@rachie.is-a-geek.net>
To:        freebsd-questions@freebsd.org
Cc:        Gary Kline <kline@thought.org>
Subject:   Re: why is this script failing?
Message-ID:  <200807142234.03070.fbsd.questions@rachie.is-a-geek.net>
In-Reply-To: <20080714201241.GA22443@thought.org>
References:  <20080714201241.GA22443@thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 14 July 2008 22:12:47 Gary Kline wrote:
> 	people,
>
> 	for reasons i don't understand completely, i wind up with
> 	*wav* files in my /tmp/kde-kline/* directory. plus othr misc junk
> 	files.
>
> 	why is this script not finding them?
>
>
> wav=/tmp/kde-kline/\*wav\*
>
> if [ -s $wav ]

Hint: this works, if there's only 1 wav file.
The way to do it:
if test ! -z "$wav"; then
	for f in $wav; do
		rm $f
	done
else
	echo "No wav files"
fi

-- 
Mel

Problem with today's modular software: they start with the modules
    and never get to the software part.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807142234.03070.fbsd.questions>