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

Re: formerly: emacs guy needs vi hack



On Mon, Jul 09, 2001 at 03:23:09PM -0500, Blunier, Mark wrote:
> > Thanks for all of the good info.  Okay, how about
> > this: I ran this cron job on July 4th, and I shouldn't
> > have, so I have a 500 line file with a dozen or so
> > redundant entries.  Anybody know a good way to clean
> > them out?  I sorted the file so the pairs show up but
> > they're scattered.  No biggee.  I think my script will
> > pass on the redundant ones without too much trouble.  
> 
> cat file | sort | uniq > newfile

If you're gonna muck up the order, you can just

sort -u < file > newfile

and forget all about the extra pipe to uniq :)  Of course,
that assumes that all 500 entries happened at the exact same
time or do not have a timestamp at all...

--Danny
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.