[HPADM] SUMMARY: sort / unique question--again

From: Copeland, Daniel (Daniel.Copeland@alcoa.com)
Date: Wed Oct 30 2002 - 15:39:11 EST


Sorry all.

I left the original question out of my first summary. Here it is:

Admins,

If I had a text file w/ the output of syminq, can I sort on the serial
number column and remove the duplicate from this column?

Here's a bit of the file:

                                                                Serial #
/dev/rdsk/c4t1d7 BCV EMC SYMMETRIX 5568 08020000
35354880
/dev/rdsk/c4t2d0 BCV EMC SYMMETRIX 5568 08024000
35354880
/dev/rdsk/c4t2d3 BCV EMC SYMMETRIX 5568 08030000
8838720
/dev/rdsk/c4t2d4 BCV EMC SYMMETRIX 5568 08031000
8838720
/dev/rdsk/c4t2d5 BCV EMC SYMMETRIX 5568 08032000
8838720

tia,
Dan

-----Original Message-----
From: Copeland, Daniel
Sent: Wednesday, October 30, 2002 10:09 AM
To: 'hpux-admin@DutchWorks.nl'
Subject: SUMMARY: [HPADM] sort / unique question

Admins,

Sorry about the delayed summary (I've been away for a while).

Thanks to Anand Hotchandani, Ed Guenther, Bruno Hautecoeur, and Bill Hassell

Below are the suggestions:
sort -u -n -k 4,4 <filename>

u ---- unique
n ---- numeric
k ---- key

sort -n -k # | uniq | sort -n

sort -nk5 YourFileName | uniq

Thanks,
Dan

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:21 EDT