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

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

Whats wrong with 'sets in grep'


From: SPS Khokhar
Subject: Whats wrong with 'sets in grep'
Date: Tue, 19 Dec 2006 13:07:43 +0530

hi!

Kindly someone explain to me, what is wrong with 'sets in grep'

following are two commands logically seems same but results are like
north-south pole, not same.

what i want is - All files/dir having names in uppercases only

------------------------------------------------
[simrat > simrat]$ ls | grep ^[A-Z]*$
crbt
Desktop
evolution
ice
just
Linux
misc
MYSHARE
scripting
send
test
zBochs

[simrat > simrat]$ ls | grep ^[ABCDEFGHIJKLMNOPQRSTUVWXYZ]*$
MYSHARE
----------------------------------------------------

other information:

[simrat > simrat]$ grep --version
grep (GNU grep) 2.5.1

Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


[simrat > simrat]$ uname -r
2.4.21-27.EL

[simrat > simrat]$ uname -a
Linux cti-test.hfclconnect.com 2.4.21-27.EL #1 Wed Dec 1 22:08:15 EST
2004 i686 i686 i386 GNU/Linux


--
Simrat

"Darkness of this UNIVERSE  has many secrets."

<Hacking is an art, craking is offence.>




reply via email to

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