[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] bash scripting question



At 07:56 PM 9/10/2003 -0400, you wrote:
>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.
>
>You can't use wild card char. in the  [ -f .. ], your best bet is a case 
>statement.
>
>You could do it with a for loop:

[snip]

Or just pipe ls to grep?

--G