Operating System - HP-UX
1827305 Members
2402 Online
109961 Solutions
New Discussion

Re: Uniq command case sensitive

 
SOLVED
Go to solution
Gayet_1
New Member

Uniq command case sensitive

is there a way on HPUX11.00 to make the "uniq" command non case sensitive ?
i need to report repeated lines without taking care of case
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Uniq command case sensitive

Hi,

Try the following.

tr "[:upper:]" "[:lower:]" < your_file| sort |uniq -d

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jeff Schussele
Honored Contributor

Re: Uniq command case sensitive

Hi Gayet,

You can translate the file to either all upper or all lower with tr as follows:

tr "[:upper:]" "[:lower:]" file2

(Reverse upper/lower order for the other converion)

Then run uniq against file2

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Gayet_1
New Member

Re: Uniq command case sensitive

Thx it works !!!