help-bash
[Top][All Lists]
Advanced

[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.



reply via email to

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