Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to get remove duplicate of a file based on many conditions Post 302392356 by Andre_Merzky on Thursday 4th of February 2010 06:53:12 AM
Old 02-04-2010
Error

After completing the script, I still can't reproduce your output: those seems wrong. Fir example, I can't find the line ending not in NULL, but in 2.23e+23 -- that value is simply gone, but according to your filter algrithm, that line should remain I think.

Otherwise the attached script should now be able to reproduce the data you show. It reads a data.in file, and writes a data.out.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Remove duplicate rows of a file based on a value of a column

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)
Discussion started by: risk_sly
7 Replies

2. Shell Programming and Scripting

Remove duplicate files based on text string?

Hi I have been struggling with a script for removing duplicate messages from a shared mailbox. I would like to search for duplicate messages based on the “Message-ID” string within the messages files. I have managed to find the duplicate “Message-ID” strings and (if I would like) delete... (1 Reply)
Discussion started by: spangberg
1 Replies

3. 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

4. Shell Programming and Scripting

Remove duplicate based on Group

Hi, How can I remove duplicates from a file based on group on other column? for example: Test1|Test2|Test3|Test4|Test5 Test1|Test6|Test7|Test8|Test5 Test1|Test9|Test10|Test11|Test12 Test1|Test13|Test14|Test15|Test16 Test17|Test18|Test19|Test20|Test21 Test17|Test22|Test23|Test24|Test5 ... (2 Replies)
Discussion started by: yale_work
2 Replies

5. Shell Programming and Scripting

Remove duplicate value based on two field $4 and $5

Hi All, i have input file like below... CA009156;20091003;M;AWBKCA72;123;;CANADIAN WESTERN BANK;EDMONTON;;2300, 10303, JASPER AVENUE;;T5J 3X6;; CA009156;20091003;M;AWBKCA72;321;;CANADIAN WESTERN BANK;EDMONTON;;2300, 10303, JASPER AVENUE;;T5J 3X6;; CA009156;20091003;M;AWBKCA72;231;;CANADIAN... (2 Replies)
Discussion started by: mohan sharma
2 Replies

6. Shell Programming and Scripting

How To Remove Duplicate Based on the Value?

Hi , Some time i got duplicated value in my files , bundle_identifier= B Sometext=ABC bundle_identifier= A bundle_unit=500 Sometext123=ABCD bundle_unit=400 i need to check if there is a duplicated values or not if yes , i need to check if the value is A or B when Bundle_Identified ,... (2 Replies)
Discussion started by: OTNA
2 Replies

7. Shell Programming and Scripting

Remove duplicate entries based on the range

I have file like this: chr start end chr15 99874874 99875874 chr15 99875173 99876173 aa1 chr15 99874923 99875923 chr15 99875173 99876173 aa1 chr15 99874962 99875962 chr15 99875173 99876173 aa1 chr1 ... (7 Replies)
Discussion started by: raj_k
7 Replies

8. Shell Programming and Scripting

Remove duplicate rows based on one column

Dear members, I need to filter a file based on the 8th column (that is id), and does not mather the other columns, because I want just one id (1 line of each id) and remove the duplicates lines based on this id (8th column), and does not matter wich duplicate will be removed. example of my file... (3 Replies)
Discussion started by: clarissab
3 Replies

9. Shell Programming and Scripting

Remove duplicate lines from file based on fields

Dear community, I have to remove duplicate lines from a file contains a very big ammount of rows (milions?) based on 1st and 3rd columns The data are like this: Region 23/11/2014 09:11:36 41752 Medio 23/11/2014 03:11:38 4132 Info 23/11/2014 05:11:09 4323... (2 Replies)
Discussion started by: Lord Spectre
2 Replies

10. Shell Programming and Scripting

Remove sections based on duplicate first line

Hi, I have a file with many sections in it. Each section is separated by a blank line. The first line of each section would determine if the section is duplicate or not. if the section is duplicate then remove the entire section from the file. below is the example of input and output.... (5 Replies)
Discussion started by: ahmedwaseem2000
5 Replies
lavpipe(1)							MJPEG tools manual							lavpipe(1)

NAME
lavpipe - creates raw YUV streams from pipe list scripts SYNOPSIS
lavpipe [-o num] [-n num] pipe-list DESCRIPTION
lavpipe reads a script file called 'pipe list' that is of a similar structure as the edit lists that can be fed into lav2yuv. For info about the pipe list format see below. The pipe list defines several video sources and filters that are combined by lavpipe to produce a single output YUV stream on stdout (which for example can be compressed and stored to disk via mpeg2enc(1) or yuv2lav(1)). OPTIONS
The command line options are used to output a specific part of the resulting video stream. That means you can tell lavpipe how many frames to skip and how many frames to deliver from that point on. -o num This is the frame offset of the output video. The first num frames of the resulting video simply are neither calculated nor written to stdout. This value defaults to 0. -n num This is the frame count. If the input files or streams defined in the pipe list script are long enough, the output will be of exactly num frames length. A value of 0 means that all frames until the last one as defined in the pipe list will be written out, as long as there's some input (0 is the default). pipe-list This is name of the pipe list file that lavpipe will 'execute'. For information about this file's format see below. -? Display a synopsis of the command syntax. EXAMPLES
lavpipe -o 100 -n 25 film.pli would calculate and output to stdout frames 100 to 124 as defined in film.pli (in PAL this would be the 5th second of the film). lavpipe input.pli | yuv2lav -q80 output.avi would save the movie assembled by lavpipe as a single AVI file. USAGE
In this section the format of lavpipe's input files the pipe list scripts is explained. If you need some examples or a more detailed tuto- rial, please read the mjpegtools(1) manpage's section about CREATING MOVIE TRANSITIONS. and the file README.lavpipe that should be included in the distribution. Also feel free to contact us via the mailing list (see below). A pipe list contains of two parts: the YUV source list and after this, as many sequence descriptions as wanted. It always begins with the following two lines: LAV Pipe List This is the first line in every pipe list script. It is used as a simple test if lavpipe really was given a pipe list script and not your PhD thesis as input. NTSC|PAL This is the second line in every pipe list and can be either PAL or NTSC, depending on what video standard you use. I don't remember if this is used at the moment. Now follows the source list: num This is the number of input commands. lavpipe will read the next num lines and interpret them as input stream commands. command (num times) This is a valid command line with two variables $o and $n that will be replaced by lavpipe with the offset and number of frames that the program has to output. Example: lav2yuv -o $o -f $n input.avi Thus, an example source list could look like this: 2 lav2yuv -o $o -f $n scene1.avi lav2yuv -o $o -f $n scene2.avi after this you can append as many sequence descriptions as needed. Each of them is built up as follows: num The number of frames that this sequence will last. num The number of inputs that will be used in this sequence. This number must of course be less than or equal to the number of inputs that are defined above. idx [ofs] (num times) These are the indices to the sources that are defined at the beginning of the file (first source is 0) with an optional frame offset (i.e. sequence starts with frame number ofs of this input.) - this value defaults to 0. Example: 0 150 command This is a valid command line to a YUV filter tool that reads num input streams and writes one output stream, combining its inputs. Optionally, the filter tool can be given the two $o and $n variables that will be replaced by lavpipe as in the source commands (see above). For further info read README.lavpipe or the documentation for the filter programs (if available). An example filter could look like this: transist.flt -o 0 -O 255 -s $o -n $n -d 50 And if the sequence only has one input that simply should be copied to the output, you can use a dash instead of a command line: - And here's an example for a complete pipe list that implements a transistion from scene1.avi to scene2.avi REMOVE THE COMMENTS AFTER The # LAV Pipe List PAL 2 lav2yuv -o $o -f $n scene1.avi lav2yuv -o $o -f $n scene2.avi 50 # first sequence: 50 frames 1 # contains one input: 0 0 # scene1.avi, offset 0 - # simple output 25 # second sequence: 25 frames 2 # contains two inputs: 0 50 # scene1.avi, offset 50 1 # scene2.avi, offset 0 transist.flt -o 0 -O 255 -s $o -n $n -d 50 # transistion 50 # third sequence: 50 frames 1 # contains one input: 1 25 # scene2.avi, offset 25 - # simple output BUGS
I'm sure there are enough of them. lavpipe often accepts malformed pipe lists and then writes out a video that was all but intended - with- out warning. The mention of $n above is wrong. At one time there were two parameters but now a program is allowed to produce as many frames as it wants. THe author of the program hard coded, for reasons unknown, $n to be 0. NOTES
There are also some serious limitations in the system, such as frame-by-frame processing. But as the goal when writing lavpipe was the sim- plicity of the pipeline, other tools will have to be written to do more interesting tasks. But I want to note that it is very well possible to write a pipe list that combines several files, and then use that pipe list as an input for another pipe list by simply using the lavpipe command in the source list (see above) - this can be already used to do some nice things, if you have some nice filters. Comments are NOT allowed in pipelist files. The comments (text after #) above are for illustration only. AUTHOR
This man page was written by Philipp Zabel. If you have questions, remarks, problems or you just want to contact the developers, the main mailing list for the MJPEG-tools is: mjpeg-users@lists.sourceforge.net For more info, see our website at http://mjpeg.sourceforge.net SEE ALSO
lav2yuv(1), lavplay(1), lavrec(1), mpeg2enc(1), yuv2lav(1), yuvscaler(1) MJPEG Linux Square 2 June 2001 lavpipe(1)
All times are GMT -4. The time now is 10:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy