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: Linda Walsh
Subject: Re: /dev/fd/62: No such file or directory
Date: Sat, 05 Apr 2014 03:46:35 -0700
User-agent: Thunderbird



Chris Down wrote:
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.
----
Pattern matching?   Why doesn't '*' match anything then?

Do you mean pathname expansion?  or are you thinking of the =~
operator?  I.e. where would it match a pattern?  It can't match
in the current directory, since it just failed a pathname
expansion in the line before.  But for a regex, I thought you
needed '=~' ??



reply via email to

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