[ale] bash scripting question
Danny Cox
danscox at mindspring.com
Thu Sep 11 17:26:13 EDT 2003
Another variant:
[ $(echo *.c | wc -w) -gt 0 ]
echo is a shell built-in.
On Wed, 2003-09-10 at 20:21, David Corbin wrote:
> I like....
>
> [ `ls ... | wc -l ` -gt 0 ]
>
> On Wednesday 10 September 2003 19:49, Kevin Krumwiede wrote:
> > I need a boolean statement that will evaluate to true if one or more files
> > matching a wildcard exist. I tried [ -f ... ], it works if there is
> > exactly one matching file, but not if there are more.
--
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.
Danny
More information about the Ale
mailing list