You should take jidanni with a large salt shaker handy. He expects all GNU documentation to serve as cookbooks for any and every problem he might like to solve, and is therefore upset when whatever problem he's trying to solve at the moment isn't immediately there in whatever documentation (man page, info file) he's looking at.
I've learned this the hard way with gawk. Your answer as to what the grep man page can and should do is 100% on target. Arnold > Date: Mon, 06 Mar 2006 23:59:45 +0000 > From: Julian Foad <[EMAIL PROTECTED]> > Subject: Re: say if grep can find non-ascii > To: [email protected] > Cc: [EMAIL PROTECTED], Dan Jacobson <[EMAIL PROTECTED]> > > > Dan Jacobson wrote: > > The grep manual page should say how to do > > $ perl -nwe 'print if /[^[:ascii:]]/' > > but with grep. Or say if there's no way. > > I don't think the Grep manual should say explicitly how to do that particular > thing. The Grep manual should (and does) describe exactly what Grep can do > and > how to make it do what it can do, and it may give some examples. Is there > any > particular reason you feel it should describe how to do the equivalent of > your > particular Perl command? > > As far as I can tell, you want to find each line that contains a non-ASCII > character, except that I'm not sure what the definition of "ASCII" is in this > case, nor how the behaviour of this Perl command is affected by locale. > > I assume you've seen in Grep's manual (and I'll assume you're using Grep > v2.5.1) that it supports a set of character classes such as "[:alnum:]" but > not > "[:ascii:]". > > Does the following command do what you want? > > grep '[ -~]' > > - Julian
