Removing lines that are (same in content) based on columns


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Removing lines that are (same in content) based on columns
Prev   Next
# 1  
Old 11-08-2007
Lightbulb Removing lines that are (same in content) based on columns

I have a file which looks like

AA BB CC DD EE FF GG HH KK
AA BB GG HH KK FF CC DD EE
AA BB CC DD EE UU VV XX ZZ
AA BB VV XX ZZ UU CC DD EE

....
I want the script to give me only one line based on duplicate contents:

AA BB CC DD EE FF GG HH KK
AA BB CC DD EE UU VV XX ZZ
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing duplicate lines on first column based with pipe delimiter

Hi, I have tried to remove dublicate lines based on first column with pipe delimiter . but i ma not able to get some uniqu lines Command : sort -t'|' -nuk1 file.txt Input : 38376KZ|09/25/15|1.057 38376KZ|09/25/15|1.057 02006YB|09/25/15|0.859 12593PS|09/25/15|2.803... (2 Replies)
Discussion started by: parithi06
2 Replies

2. Shell Programming and Scripting

Removing duplicates from delimited file based on 2 columns

Hi guys,Got a bit of a bind I'm in. I'm looking to remove duplicates from a pipe delimited file, but do so based on 2 columns. Sounds easy enough, but here's the kicker... Column #1 is a simple ID, which is used to identify the duplicate. Once dups are identified, I need to only keep the one... (2 Replies)
Discussion started by: kevinprood
2 Replies

3. Shell Programming and Scripting

Copying lines from multiple logfiles, based on content of the line

d df d d (1 Reply)
Discussion started by: larsk
1 Replies

4. UNIX for Advanced & Expert Users

Removing files based on name and content

Consider i have 2 directories a1 and a2. under a1, i have below files test1 test2 test3. Under a2,i have below files. test1 test2 test3 test4 test5My requirement is i will pass the directory names(2 parameters) and directory in which files needs to be removed.(3rd parameter) a)first... (11 Replies)
Discussion started by: pandeesh
11 Replies

5. Shell Programming and Scripting

Concatenating more than two lines into one based on some columns

Hi, I need to concatenate some lines in a file based on the First 4 coloumns of a file .. (For Eg.) Consider a file ... I,01,000002,0666,00000.00,000,00,000,000, ,0 I,01,000002,0667,00000.00,000,00,000,000, ,0 I,01,000002,0666,00056.10 I,01,000002,0667,00056.10 I,01,000002,0666,00001... (6 Replies)
Discussion started by: Sri3001
6 Replies

6. UNIX for Dummies Questions & Answers

remove duplicate lines based on two columns and judging from a third one

hello all, I have an input file with four columns like this with a lot of lines and for example, line 1 and line 5 match because the first 4 characters match and the fourth column matches too. I want to keep the line that has the lowest number in the third column. So I discard line 5.... (5 Replies)
Discussion started by: TheTransporter
5 Replies

7. UNIX for Dummies Questions & Answers

Removing Lines based on matching first column

I have a file1 that looks like this: File 1 a b b c c e d e and a file 2 that looks like this: File 2 b c e e Note that file 2 is the right hand column from file1. I want to remove any lines from file1 that begin with the column in file2. In this case the desired output... (6 Replies)
Discussion started by: kschiltz55
6 Replies

8. Shell Programming and Scripting

awk : extracting unique lines based on columns

Hi, snp.txt CHR_A SNP_A BP_A_st BP_A_End CHR_B BP_B SNP_B R2 p-SNP_A p-SNP_B 5 rs1988728 74904317 74904318 5 74960646 rs1427924 0.377333 0.000740085 0.013930081 5 ... (12 Replies)
Discussion started by: genehunter
12 Replies

9. Shell Programming and Scripting

finding duplicates in columns and removing lines

I am trying to figure out how to scan a file like so: 1 ralphs office","555-555-5555","ralph@mail.com","www.ralph.com 2 margies office","555-555-5555","ralph@mail.com","www.ralph.com 3 kims office","555-555-5555","kims@mail.com","www.ralph.com 4 tims... (17 Replies)
Discussion started by: totus
17 Replies

10. Shell Programming and Scripting

Help removing lines with duplicated columns

Hi Guys... Please Could you help me with the following ? aaaa bbbb cccc sdsd aaaa bbbb cccc qwer as you can see, the 2 lines are matched in three fields... how can I delete this pupicate ? I mean to delete the second one if 3 fields were duplicated ? Thanks (14 Replies)
Discussion started by: yahyaaa
14 Replies
Login or Register to Ask a Question
reglookup-timeline(1)													     reglookup-timeline(1)

NAME
reglookup-timeline - Windows NT+ registry MTIME timeline generator SYNOPSIS
reglookup-timeline [-H] registry-file [registry-file ...] DESCRIPTION
This script is a wrapper for reglookup(1), and reads one or more registry files to produce an MTIME-sorted output. This is helpful when building timelines for forensic investigations. PARAMETERS
reglookup-timeline accepts one or more registry file names. All of the provided registries will be parsed using reglookup(1). The -H option may be used to omit the header line. OUTPUT
reglookup-timeline generates a comma-separated values (CSV) compatible format to stdout. While the output of reglookup-timeline and reglookup(1) differ in the columns returned, the base format is the same. Currently, reglookup-timeline returns three columns: MTIME, FILE, and PATH. Only rows representing registry keys are returned, since MTIMEs are not stored for values. The FILE column indicates which registry file (provided as an argument) the key came from. Finally, the PATH field contains the full registry path to the key. Records are returned sorted in ascending order based on the MTIME column. BUGS
This script is new, and as such it's interface may change significantly over the next few revisions. In particular, additional command line options will likely be added, and the output of the script may be altered in minor ways. It is very difficult to find documentation on what precise operations cause the MTIMEs to be updated. Basic experimentation indicates that a key's stamp is updated anytime an immediate sub-value or sub-key is created, renamed, deleted, or it's value is modified. If this MTIME data is critical to an investigation, any conclusions should be validated through experimentation in a controlled lab environment. This software should be considered unstable at this time. CREDITS
This script was written by Timothy D. Morgan based on suggestions from Uwe Danz. Please see source code for a full list of copyrights. LICENSE
Please see the file "LICENSE" included with this software distribution. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more details. SEE ALSO
reglookup(1) reglookup-recover(1) File Conversion Utilities 8 March 2010 reglookup-timeline(1)