[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern M
From: |
Greg Wooledge |
Subject: |
Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching |
Date: |
Thu, 18 Jun 2015 10:21:03 -0400 |
User-agent: |
Mutt/1.4.2.3i |
On Thu, Jun 18, 2015 at 02:40:23PM +0100, Stephane Chazelas wrote:
> Not to mention that those globs (which have been in Unix for
> over 45 years old) are universally found including in MS-DOS for
> decades.
MS-DOS globs are not the same. I can think of at least two significant
differences off the top of my head:
1) MS-DOS filenames have two parts, and your glob must specify both parts.
For example, a glob of * will not match all files in the current
directory; it will only match all files where the second part (the
"extension") is empty. To match all files you must use *.* .
2) Characters following a * within a filename part are ignored. *a.txt
and *.txt both match the same set of files, because in the first glob,
the "a" character is ignored.
(I'm not including the case insensitivity of MS-DOS because that's
consistent all the way down to the file system, not just in globs.)
There may be other differences. I haven't worked with MS-DOS in a long
time.
- [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Michael Convey, 2015/06/16
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Greg Wooledge, 2015/06/17
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Chet Ramey, 2015/06/17
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Michael Convey, 2015/06/17
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Chet Ramey, 2015/06/17
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Chet Ramey, 2015/06/17
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Michael Convey, 2015/06/17
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Dennis Williamson, 2015/06/17
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Stephane Chazelas, 2015/06/18
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching,
Greg Wooledge <=
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Stephane Chazelas, 2015/06/18
Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Michael Convey, 2015/06/17
Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Stephane Chazelas, 2015/06/17