![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help removing lines with duplicated columns | yahyaaa | Shell Programming and Scripting | 14 | 05-17-2008 04:33 AM |
| Remove lines, Sorted with Time based columns using AWK & SORT | karthikn7974 | Shell Programming and Scripting | 1 | 05-09-2008 08:04 PM |
| How to remove duplicate records with out sort | svenkatareddy | SUN Solaris | 2 | 02-28-2008 04:38 AM |
| remove duplicated columns | kamel.seg | Shell Programming and Scripting | 6 | 02-21-2008 03:36 AM |
| remove duplicated xml record in a file under unix | happyv | Shell Programming and Scripting | 8 | 09-20-2006 10:36 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
remove duplicated lines without sort
Hi
Just wondering whether or not I can remove duplicated lines without sort For example, I use the command who, which shows users who are logging on. In some cases, it shows duplicated lines of users who are logging on more than one terminal. Normally, I would do who | cut -d" " -f1 | sort |uniq But I realised that I do not want data to be sorted. Is there any other ways to do it? |
| Forum Sponsor | ||
|
|
|
|||
|
I am new to awk or you can say UNIX. Honestly, I do not understand awk at the moment.
I will try to study it. Thank you for your reply anyway. Duplicated lines are not adjacent and I can remove any of them. Cheers, Last edited by lalelle; 08-20-2007 at 07:06 PM. Reason: wrong spelling |