This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Potential 'test' bug
- To: gnu-win32 at cygnus dot com
- Subject: Re: Potential 'test' bug
- From: mh at mike dot franken dot de (Michael Hirmke)
- Date: 11 Jul 1998 00:27:00 +0200
- Organization: Kommunikationsnetz Franken e.V. (Nuernberg)
Hi,
[...]
> I am not certain the command "test -f /temp/*" is valid,
No it is not - the shell expands '*' to all the available filenames,
before test gets them, so your command really looks like
test -f /tmp/foo /tmp/bar ...
[...]
> Perhaps another file operator is required to test if a directory
> contains one or more files.
in bash for example:
test $( ls -l /temp/* 2>/dev/null | wc -l ) -gt 0
[...]
Bye.
Michael.
--
Michael Hirmke | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX +49 (911) 557664
90489 Nuernberg | E-Mail mailto:mh@mike.franken.de
| WWW http://aquarius.franken.de/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".