Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

FAQ : how to check for existence of a file ABC*



Hi,

sorry if this is a FAQ (I just couldn't find it)

I like to check if there is any file matching a given file pattern
e.g.  XX*

My problem is,

if NULL_GLOB is unset the shell bails out if no such file exists;
but if NULL_GLOB is set, then the test   [[ -f XX* ]] is invalid since
XX* expands to a null string.

Many thanks for your patience,
Helmut.

-- 
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany



Messages sorted by: Reverse Date, Date, Thread, Author