[NTLUG:Discuss] eliminating lines with the same information

Wayne Walker waynewalker at bybent.com
Mon Jul 2 18:55:07 CDT 2007


On Mon, Jul 02, 2007 at 05:09:08PM -0500, Stuart Johnston wrote:
> Woo Hoo!!  Wayne wins the coveted Useless Use of Cat Award!!  ;)
> 
> http://partmaps.org/era/unix/award.html
> 
>  > sed -e 's/.*<//' -e 's/>.*//' < file_with_names | sort -u

And Stuart gets the useless use of < award...

sed -e 's/.*<//' -e 's/>.*//' file_with_names | sort -u

Wayne used cat at the front because in a tutorial pure left to right action is clearer.
  :-)
	(damn IT Instructors trying to unobfuscate things)
> Wayne Walker wrote:
> > cat file_with_names | sed -e 's/.*<//' -e 's/>.*//' | sort -u


Thanks for the pointer to that site though.  I personally hand out the Useless use of Kill -9 award almost daily!!!!

Wayne




More information about the Discuss mailing list