Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Sep 2007 13:20:02 -0400
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Kurt Buff <kurt.buff@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Scripting question
Message-ID:  <20070913172001.GA78799@gizmo.acns.msu.edu>
In-Reply-To: <a9f4a3860709131016w54c12b6fy94fc2b0f286aea3d@mail.gmail.com>
References:  <a9f4a3860709131016w54c12b6fy94fc2b0f286aea3d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 13, 2007 at 10:16:40AM -0700, Kurt Buff wrote:

> I'm trying to do some text file manipulation, and it's driving me nuts.
> 
> I've got a sorted file of SMTP addresses, and want to eliminate the
> lines that are the same up to a space character within the line.
> 
> Example:
> 
> kurt.buff@gmail.com NO
> kurt.buff@gmail.com OK
> 
> The above lines *both* need to be eliminated from output - I don't
> want the first or second of them, I want them both gone.
> 
> I've looked at sort and uniq, and I've googled a fair bit but can't
> seem to find anything that would do this.

Seems like this is right up sort's alley.
Is the first string always separated from the rest by white space
or does your first string sometimes include white space.

////jerry

> 
> I don't have the perl skills, though that would be ideal.
> 
> Any help out there?
> 
> Kurt
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070913172001.GA78799>