bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: grep


From: Chris Jones
Subject: Re: grep
Date: Sat, 25 Apr 2009 04:02:39 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

On Sat, Apr 25, 2009 at 01:43:22AM EDT, Ralf Wildenhues wrote:
> Hello Vincenzo,
> 
> * Vincenzo Antignano wrote on Sat, Apr 25, 2009 at 03:31:31AM CEST:

> > The pattern '\<\.' does not match words starting with a dot.

> That's because a dot isn't considered to be part of a word; only
> letters, digits, and the underscore are.  Also, while uncommon, I
> think user and group names could start with a dot, too; and file names
> could contain a space and then a dot in the middle of the name.

Yes, since "words" cannot begin with a dot, searching for "words" that
start with a '.' doesn't make sense in the first place.

I could be wrong but it looks to me like there is no "quick and dirty"
solution via a user-friendly "builtin" such as '\<' (or the -w flag) -
you have to put together a regular expression "the hard way" trying not
to leave out anything.

How do I grep a bunch of documents for all occurrences of "words" such
as '.bashrc', '.bash-history' etc. ..?

CJ




reply via email to

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