The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
remove duplicated lines without sort
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
remove duplicated lines without sort
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
08-20-2007
summer_cherry
Registered User
Join Date: Jun 2007
Location: Beijing China
Posts: 557
hi
Try follow one, use awk array to remember the appearance of the line:
Code:
awk '{ if (arr[$0]=="") arr[$0]=1 } END{ for (i in arr) print i }' filename
summer_cherry
View Public Profile
Find all posts by summer_cherry