On Sat, 2011-05-28 at 20:29 -0700, suvayu ali wrote:
> Hi Patrick,
> On Sat, May 28, 2011 at 8:22 PM, Patrick O'Callaghan
> <email@example.com> wrote:
> >> >
> >> > $ ls .[^.]*
> >> >
> >> Thanks a lot Patrick, I had no idea ls accepted regular expressions!
> > It doesn't. You need to read up on how the Shell works.
> I was under the impression the shell accepts simple globs like '?' for
> any single character and '*' for any one or more characters hence I
> assumed it is an ls feature. I just read the "pattern matching"
> section in 'man bash' and realised I was misinformed.
The use of regular expressions for filename matching dates back to the
beginnings of Unix. In fact on 16-bit machines it was actually done in a
separate program called /etc/glob, called by the Shell when needed,
since otherwise the Shell process would have been too big for the
address space (64Kb :-). Those days have long gone of course.
BTW this is where we get the verb "globbing" meaning "filename
users mailing list
To unsubscribe or change subscription options: