On Tue, Mar 29, 2011 at 3:09 AM, Linda Walsh <b...@tlinx.org> wrote:

>
>
> Greg Wooledge wrote:
>
>> On Mon, Mar 28, 2011 at 10:53:21AM -0700, Linda Walsh wrote:
>>
>>> if [ ! -e $d/S??sshd ]; then echo "sshd not enabled"; fi
>>>
>>
>> That will fail quite colorfully if the glob matches multiple files.
>> (Also, "$d" should be quoted.)
>>
> ---
>
> If, in 30 years of unix experience, I'd ever seen multiple matches for
> the above pattern, I would be concerned...
>

I often use [[ ]] like this:

if [[ $filename = *.log ]]; then echo ...; fi

You'll often see multiple matches for the above pattern. :)


> --
>

Clark J. Wang

Reply via email to