9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
how can delete duplicate files in file form, e.g.
$cat file1
aaa 123 234 345 456
bbb 345 345 657 568
ccc 345 768 897 456
aaa 123 234 345 456
ddd 786 784 234 263
ccc 345 768 897 456
aaa 123 234 345 456
ccc 345 768 897 456
then i need ouput file1 some, (4 Replies)
Discussion started by: aav1307
4 Replies
2. Shell Programming and Scripting
Hi
I have a file
1 xyz 456
1 xyz 456
1 xyz 456
2 abc 8459
3 gfd 657
4 ghf 658
4 ghf 658
I want the output
1 xyz 456
2 abc 8459
3 gfd 657
4 ghf 658 (3 Replies)
Discussion started by: manigrover
3 Replies
3. Shell Programming and Scripting
Hello Esteemed Members,
I need to write a script to search for files that have one or more than one rows similar.
Please note that there is no specific pattern that I am searching for. The rows can be different, I just need to find out two or more similar records in two or more files.
There... (7 Replies)
Discussion started by: Yoodit
7 Replies
4. Shell Programming and Scripting
I have a short line of code that checks very rudimentary for duplicate code:
sort myfile.cpp | uniq -c | grep -v "^.*1 " | grep -v "}"
It sorts the file, counts occurrences of each line, removes single occurrences and removes the ubiquitous closing brace. The language is C++, but is easily... (3 Replies)
Discussion started by: figaro
3 Replies
5. Shell Programming and Scripting
Hi i have a file like
110.10
120.10
-1120
110.10
and the lines are having more than 10k.
do we have anycommand to check the duplicate entries in the file.
I applied the while loop by greping each line with whole file,
but it is taking huge amount of time as the file size is large.
... (5 Replies)
Discussion started by: saluja.deepak
5 Replies
6. Shell Programming and Scripting
I have data like:
Blue Apple 6
Red Apple 7
Yellow Apple 8
Green Banana 2
Purple Banana 8
Orange Pear 11
What I want to do is if $2 in a row is the same as $2 in the previous row remove that row. An identical $2 may exist more than one time.
So the out file would look like:
Blue... (4 Replies)
Discussion started by: dcfargo
4 Replies
7. Shell Programming and Scripting
Hi,
How to identify duplicate columns in a row?
Input data: may have 30 columns
9211480750 LK 120070417 920091030
9211480893 AZ 120070607
9205323621 O7 120090914 120090914 1420090914 2020090914 2020090914
9211479568 AZ 120070327 320090730
9211479571 MM 120070326
9211480892 MM 120070324... (3 Replies)
Discussion started by: suresh3566
3 Replies
8. Shell Programming and Scripting
I'm trying to remove lines of data that contain duplicate data in a specific column.
For example.
apple 12345
apple 54321
apple 14234
orange 55656
orange 88989
orange 99898
I only want to see
apple 12345
orange 55656
How would i go about doing this? (5 Replies)
Discussion started by: spartan22
5 Replies
9. Shell Programming and Scripting
Hi,
I need to delete all occurences of the repeated lines from a file and retain only the lines that is not repeated elsewhere in the file. As seen below the first two lines are same except that for the string "From BaseLine" and "From SMS".I shouldn't consider the string "From SMS" and "From... (7 Replies)
Discussion started by: ragavhere
7 Replies