[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: |
Greg Wooledge |
Subject: |
Re: [Help-bash] Glob star pattern does not match files beginning with a period |
Date: |
Wed, 15 Jul 2015 16:16:37 -0400 |
User-agent: |
Mutt/1.4.2.3i |
> > On Mon, Jul 13, 2015 at 2:55 PM, Evan Gates <address@hidden> wrote:
> >> Almost. You want .[!.]* and ..?* so you don't miss files like ..foobar
On Wed, Jul 15, 2015 at 12:58:03PM -0700, Michael Convey wrote:
> ???I've done some more testing of this and found no difference between
> ???ls -dl .[!.]?*
> and
> ls -dl .[!.]*
You want BOTH of them at the same time.
imadev:~/tmp2$ touch .foo ..bar
imadev:~/tmp2$ echo .[!.]* ..?*
.foo ..bar
But really, if you are in bash, just use dotglob. That's what it's for.
This cryptic .[!.]* ..?* stuff is only needed for lesser shells.
imadev:~/tmp2$ shopt -s dotglob
imadev:~/tmp2$ echo *
.foo ..bar
Nice and simple, right?
- [Help-bash] Glob star pattern does not match files beginning with a period, David Niklas, 2015/07/13
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Michael Convey, 2015/07/13
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Evan Gates, 2015/07/13
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Michael Convey, 2015/07/13
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Michael Convey, 2015/07/15
- Re: [Help-bash] Glob star pattern does not match files beginning with a period,
Greg Wooledge <=
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Eric Blake, 2015/07/15
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Michael Convey, 2015/07/15
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Peter West, 2015/07/16
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Greg Wooledge, 2015/07/16
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Eric Blake, 2015/07/16
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Michael Convey, 2015/07/16
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Eric Blake, 2015/07/16
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Greg Wooledge, 2015/07/17
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Stephane Chazelas, 2015/07/21
- Re: [Help-bash] Glob star pattern does not match files beginning with a period, Michael Convey, 2015/07/24