help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Glob star pattern does not match files beginning with a


From: Michael Convey
Subject: Re: [Help-bash] Glob star pattern does not match files beginning with a period
Date: Thu, 16 Jul 2015 17:58:28 -0700

On Wed, Jul 15, 2015 at 1:19 PM, Eric Blake <address@hidden> wrote:

>
> Both of these three-glob approaches can be used to obtain all file names
> that are not '.' or '..':
>
> ls -d * .[!.]* ..?*
>
> or:
>
> ls -d * .??* .[!.]
>
> but you still have to deal with the fact that unless nullglob  is
> enabled to eliminate a glob that has no matches, you are then passing
> unexpanded globs to ls that may result in listing a valid file name
> twice, or in ls reporting an error about a file not found.
>

I understand an error will result, but I don't understand how passing an
unexpanded glob to ls can ​result in listing a valid filename twice. Please
explain.

Btw, all of the information you have provided is invaluable, thank you.
I've made flashcards to help me remember these concepts.


reply via email to

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