![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ignore Duplicate Post | iago | UNIX for Dummies Questions & Answers | 0 | 09-04-2007 05:29 AM |
| removing duplicate lines from a file | ocelot | UNIX for Dummies Questions & Answers | 4 | 01-25-2007 11:02 AM |
| Ignore case sensitive in Case Switch | annelisa | Shell Programming and Scripting | 1 | 07-13-2006 04:36 AM |
| Ignore Case in Shell | AAH | Shell Programming and Scripting | 3 | 03-21-2006 04:41 PM |
| How can I ignore only the lines which have # at the begining? | csaha | Shell Programming and Scripting | 1 | 01-30-2006 03:35 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
Removing duplicate lines ignore case
hi,
I have the following input in file: abc ab a AB b c a C B When I use uniq -u file,the out put file is: abc ab AB c v B C b Unfortunately, the uniq is not able to ignore case. How can I check the file in order my output file will be: abc v Thanks, Roy. |
|
||||
|
It is not good
Because then I will lose the real values in the original file and the data I will get will be like converted (from lower to upper or and vice versia), because the input in file can be for example: "RsdA" and it has meaning
I thought there is a special/smart uniq that can do it. Does anyone know how to do it? Anyway, Thanks. |
|
||||
|
I still don't get it, look at my example
file1 contain:
danIel Kevin DON KEVIN don If I run your command as the following : cat file1 | tr "[a-z]" "[A-Z]" | sort -u >outputFile outPutFile contain: DANIEL DON KEVIN And this is not what I expect: I need that the output will contain: danIel This is why I use uniq -u but it doesn't ignore case. Thanks, Roy. |
|
||||
|
still doesn't solve my problem
Your script is great but it doesn't answer my question.
I need to keep the exact uniq content I have in the original file: (suppose That each line has a pssword which is case sensetive) So if my input file1 contain: DAVID, aaBBCC don, abcDk kevin KEVIN DON, aBcDk When I activate your script, I get: david aabbcc (line case was change) And this is not what I need, I except to have the exact uniq content: DAVID, aaBBCC Again, thank you very much for your efforts and I hope that I will finally have a solution for it. Roy |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|