[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.
pgpZ5XtroPMVu.pgp
Description: PGP signature
- Re: /dev/fd/62: No such file or directory, Linda Walsh, 2014/04/01
- Re: /dev/fd/62: No such file or directory, Pierre Gaston, 2014/04/02
- Re: /dev/fd/62: No such file or directory, Greg Wooledge, 2014/04/02
- Re: /dev/fd/62: No such file or directory, Linda Walsh, 2014/04/05
- Re: /dev/fd/62: No such file or directory,
Chris Down <=
- Re: /dev/fd/62: No such file or directory, Linda Walsh, 2014/04/05
- Re: /dev/fd/62: No such file or directory, Chris Down, 2014/04/05
- Re: /dev/fd/62: No such file or directory, Pierre Gaston, 2014/04/05
- Re: /dev/fd/62: No such file or directory, Linda Walsh, 2014/04/05