[kwlug-disc] Grep on Ubuntu 11.04 (aka The Natty Narwhal)
John Johnson
jvj at golden.net
Sat May 7 01:03:32 EDT 2011
On 2011-05-07 00:04, Darcy Casselman wrote:
> I'm a little confused.
>
> Can you give some input and expected output?
>
> Darcy.
>
> On Fri, May 6, 2011 at 11:32 PM, John Johnson<jvj at golden.net> wrote:
>> > What happened to my old friend: grep on Grep on Ubuntu 11.04 (aka The Natty
>> > Narwhal)?
>> > Grep on Ubuntu gives me all text matching and not matching - with matches in
>> > red.
>> > I could not find a switch that gives me only matching lines.
Using Tim Charron's Win32 port of grep for CMD32.
The first dir/b below returns the filenames of all* files with both
upper and lower case letters in the filenames.
The second dir/b is piped through grep with a regex to that passes only
filenames that have at least one uppercase character.
dir/b<ENTER>
CAN132A.JPG
CAN135B.jpg
CAN137C.JPG
CAN141A.JPG
CAN141B.JPG
CAN143A.JPG
can_135a.jpg
can_135_a_withcoins.jpg
can_136_a_withcoins.jpg
can_137_b_withcoins.jpg
can_141_c_withcoins.jpg
can_142_c_withcoins.jpg
can_143_a_withcoins.jpg
dir/b | grep [A-Z]<ENTER>
CAN132A.JPG
CAN135B.jpg
CAN137C.JPG
CAN141A.JPG
CAN141B.JPG
CAN143A.JPG
Thanks JohnJ
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1325 / Virus Database: 1500/3621 - Release Date: 05/06/11
More information about the kwlug-disc
mailing list