I have written one shell script. The output file of this script is having sql output.
In that file, I want to extract the rows which are having multiple entries(duplicate rows).
For example, the output file will be like the following way.
In this output, I want numeric duplicate rows only. Suppose this file is having lines to separate the values, those lines also considered as duplicate rows. So I want only the out put from this file which is having more than one entry and which is related to numbers.
Can anyone please tell me the command?
Thanks in advance.
hi all
can anyone please let me know if there is a way to find out duplicate rows in a file. i have a file that has hundreds of numbers(all in next row).
i want to find out the numbers that are repeted in the file.
eg.
123434
534
5575
4746767
347624
5575
i want 5575
please help (3 Replies)
I have a file content like below.
"0000000","ABLNCYI","BOTH",1049,2058,"XYZ","5711002","","Y","","","","","","","",""
"0000000","ABLNCYI","BOTH",1049,2058,"XYZ","5711002","","Y","","","","","","","",""
"0000000","ABLNCYI","BOTH",1049,2058,"XYZ","5711002","","Y","","","","","","","",""... (5 Replies)
Hi,
I am processing a file and would like to delete duplicate records as indicated by one of its column. e.g.
COL1 COL2 COL3
A 1234 1234
B 3k32 2322
C Xk32 TTT
A NEW XX22
B 3k32 ... (7 Replies)
I have searched the internet for duplicate row extracting.
All I have seen is extracting good rows or eliminating duplicate rows.
How do I extract duplicate rows from a flat file in unix.
I'm using Korn shell on HP Unix.
For.eg.
FlatFile.txt
========
123:456:678
123:456:678
123:456:876... (5 Replies)
Hi,
I have a log file having size of 48mb.
For such a large log file. I want to get the message in a particular format which includes only unique error and exception messages.
The following things to be done :
1) To remove all the date and time from the log file
2) To remove all the... (1 Reply)
Hi! I have a file as below:
line1
line2
line2
line3
line3
line3
line4
line4
line4
line4
I would like to extract duplicate lines (not unique, triplicate or quadruplicate lines). Output will be as below:
line2
line2
I would appreciate if anyone can help. Thanks. (4 Replies)
notes: i am using cygwin and notepad++ only for checking this and my OS is XP.
#!/bin/bash
typeset -i totalvalue=(wc -w /cygdrive/c/cygwinfiles/database.txt)
typeset -i totallines=(wc -l /cygdrive/c/cygwinfiles/database.txt)
typeset -i columnlines=`expr $totalvalue / $totallines`
awk -F' ' -v... (5 Replies)
How can i get the duplicates rows from a file using unix, for example i have data like
a,1
b,2
c,3
d,4
a,1
c,3
e,5
i want output to be like
a,1
c,3 (4 Replies)
Discussion started by: ggupta
4 Replies
LEARN ABOUT REDHAT
pamdeinterlace
pamdeinterlace(1) General Commands Manual pamdeinterlace(1)NAME
pamdeinterlace - remove ever other row from a PAM/PNM image
SYNOPSIS
pamdeinterlace [-takeodd] [-takeeven] N [infile]
You can use the minimum unique abbreviation of the options. You can use two hyphens instead of one. You can separate an option name from
its value with white space instead of an equals sign.
DESCRIPTION
pamdeinterlace Removes all the even-numbered or odd-numbered rows from the input PNM or PAM image. Specify which with the -takeeven and
-takeodd options.
This can be useful if the image is a video capture from an interlaced video source. In that case, each row shows the subject 1/60 second
before or after the two rows that surround it. If the subject is moving, this can detract from the quality of the image.
Because the resulting image is half the height of the input image, you will then want to use pamstretch or pnmscale to restore it to its
normal height:
pamdeinterlace myimage.ppm | pamstretch -yscale=2 >newimage.ppm
OPTIONS -takeodd
Take the odd-numbered rows from the input and put them in the output. The rows are numbered starting at zero, so the first row in
the output is the second row from the input. You cannot specify both -takeeven and -takeodd.
-takeeven
Take the even-numbered rows from the input and put them in the output. The rows are numbered starting at zero, so the first row in
the output is the first row from the input. This is the default. You cannot specify both -takeeven and -takeodd.
SEE ALSO pamstretch(1), pnmscale(1)
11 November 2001 pamdeinterlace(1)