The UNIX and Linux Forums
>
Top Forums
>
UNIX for Advanced & Expert Users
How to remove duplicate lines of a record without changing the order
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
How to remove duplicate lines of a record without changing the order
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
5
(
permalink
)
08-02-2008
radoulov
addict
Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,915
As I said,
you just need to search the forums to find the following solutions:
Code:
awk '!_[$0]++' input
Code:
perl
-ne'print unless $_{$_}++' input
or:
Code:
perl
-ne'$_{$_}++||print' input
radoulov
View Public Profile
Find all posts by radoulov
Find radoulov's past nominations received
Find radoulov's present nominations given