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

Re: Scripting help



on Thu, Mar 15, 2001 at 05:50:27PM -0600, Scott E . Graves (scottg@lintuit.com) wrote:
> If I had a list containing redundant entries, what command could I use 
> suppress the duplications. Here's an example list:
> 
> man
> man
> ls
> df
> find
> find
> find
> 
> This would be obtaining using `sa -u | grep scottg | awk '{print $8}' ` to 
> list all programs executed by user scottg. I need to condense the list to:
> 
> man
> ls
> df
> find

uniq, as suggested, but it only removes *consecutive* unique entries.

I'd suggest:

   $ sort -u < list > uniqlist

-- 
Karsten M. Self <kmself@ix.netcom.com>    http://kmself.home.netcom.com/
 What part of "Gestalt" don't you understand?       There is no K5 cabal
  http://gestalt-system.sourceforge.net/         http://www.kuro5hin.org

Attachment: pgpKWZVP9mzCu.pgp
Description: PGP signature


Reply to: