pk wrote:

>> is_file()
>> { 
>>     for f
>>     do
>>         [ -f "$f" ] && return
>>     done
>>     return 1
>> }
>> 
>> is_file /path/to/dir/* || echo empty
> 
> This fails if the directory contains a file called "*".

My bad, it works correctly. The only issue I see is maybe that "-e" would be 
more appropriate than "-f" since the first (and perhaps only) element could 
be a directory.

Reply via email to