bug-bash
[Top][All Lists]
Advanced

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

Re: /dev/fd/62: No such file or directory


From: Chris Down
Subject: Re: /dev/fd/62: No such file or directory
Date: Sat, 5 Apr 2014 18:36:43 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

Linda Walsh writes:
> So all I need do is test the first entry:
> 
>    local -a entries=("$1"/*)
>    [[ ${entries[0]} == $1/* ]] && return 0
> 
> --- the $1 doesn't need quotes in [[]] and '*' won't expand or
> am missing something?  Thanks for the tip Pierre, I often
> don't see forests because of all the trees...

The RHS of [[ has pattern matching applied on unquoted parts, so yes,
you probably want quotes around $1.

Attachment: pgpZ5XtroPMVu.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]