Sponsored Content
Top Forums UNIX for Advanced & Expert Users Remove duplicates in flat file Post 302879757 by jethrow on Sunday 15th of December 2013 01:16:57 AM
Old 12-15-2013
Code:
awk -F'|' '{k=$1"|"$4"|"$6"|"$8} !(k in keys) {print; keys[k]++}' file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove duplicates from File from specific location

How can i remove the duplicate lines from a file, for example sample123456Sample testing123456testing XXXXX131323XXXXX YYYYY423432YYYYY fsdfdsf123456gsdfdsd all the duplicates from column 6-12 , must be deleted. I want to consider the first row, if same comes in the given range i want to... (1 Reply)
Discussion started by: gopikgunda
1 Replies

2. Shell Programming and Scripting

remove duplicates within a block in a file..help required

hi.. i have a file in the following format :- name-a age -12 address-123 age-12 phone-22222 ============ name-ab age -11 address-123 age-11 phone-222223 ============= name-abc age -12 address-1234 age-12 phone-2222223 ============= (2 Replies)
Discussion started by: nipun_garg
2 Replies

3. UNIX for Dummies Questions & Answers

how to remove the first line from a flat file ?

Hi, I want to remove the first line from a flat file using unix command as simple as possible. Can anybody give me a hand ? Thanks in advance. xli (21 Replies)
Discussion started by: xli
21 Replies

4. Shell Programming and Scripting

Remove duplicates from end of file

1/p ---- A B C A C o/p --- B A C From input file it should remove duplicates from end without changing order (5 Replies)
Discussion started by: lavnayas
5 Replies

5. Shell Programming and Scripting

Remove duplicates from a file

Hi, I need to remove duplicates from a file. The file will be like this 0003 10101 20100120 abcdefghi 0003 10101 20100121 abcdefghi 0003 10101 20100122 abcdefghi 0003 10102 20100120 abcdefghi 0003 10103 20100120 abcdefghi 0003 10103 20100121 abcdefghi Here if the first colum and... (6 Replies)
Discussion started by: gpaulose
6 Replies

6. Shell Programming and Scripting

How to remove duplicates from the .dat file

All, I have a file 1181CUSTOMER-L061411_003500.dat.Z having duplicate records in it. bash-2.05$ zcat 1181CUSTOMER-L061411_003500.dat.Z|grep "90876251S" 90876251S|ABG, AN ADAYANA COMPANY|3550 DEPAUW BLVD|||US|IN|INDIANAPOLIS||DAL|46268||||||GEN|||||||USD|||ABG, AN ADAYANA... (3 Replies)
Discussion started by: Oracle_User
3 Replies

7. UNIX for Dummies Questions & Answers

How to remove numeric characters in the flat file

HI, can any one help me please .. i have flat file like qwer123rt ass3242ccf jjk654 kjh838ppp nhdg453ok hdkk34 i want remove numeric characters in the flat file i want output like this qwerrt assccf jjk kjhppp nhdgok hdkk help me... (4 Replies)
Discussion started by: rafimd1985
4 Replies

8. UNIX for Dummies Questions & Answers

Remove duplicates from a file

Can u tell me how to remove duplicate records from a file? (11 Replies)
Discussion started by: saga20
11 Replies

9. UNIX for Dummies Questions & Answers

Remove duplicates and keep them in a separate file

Hi, I have a tablular separated file and I want to remove all the rows that have duplicates. The diuplicates I need to check are in column 13. I have tried to use awk but I have no Idea how to keep the duplicate file. awk 'FNR==NR{a++;next}(a> 1)' tomodify.txt tomodify.txt > new.txt ... (4 Replies)
Discussion started by: flacchy
4 Replies

10. Shell Programming and Scripting

To remove duplicates from pipe delimited file

Hi some one please help me to remove duplicates from a pipe delimited file based on first two columns. 123|asdf|sfsd|qwrer 431|yui|qwer|opws 123|asdf|pol|njio Here My first record and last record are duplicates.As per my requirement I want all the latest records into one file. I want the... (12 Replies)
Discussion started by: ginrkf
12 Replies
FULLA(1)							       HUGIN								  FULLA(1)

NAME
fulla - Correct lens distortion, vignetting and chromatic aberration SYNOPSIS
fulla [options] inputfile(s) DESCRIPTION
Apply radial or flat-field vignetting correction as well as geometrical radial distortion and transversal chromatic aberration correction. fulla can be used to batch correct a large number of files. Radial distortion coefficients can be read from a PTLens database (only database version 4.2 is supported). Vignetting correction is done the same way as described in the nona script file documentation. Vignetting correction can be done based on a flat-field or a radial scaling. Vignetting correction by flat-field division: I = I / c, c = flat-field / mean(flat-field) Radial vignetting correction: I = I / c, c = a + b*r^2 + c*r^4 + d*r^6 The radial distortion correction is identical to the one implemented by PanoTools: r_new = a*r^4 + b*r^3 + c*r^2 + d*r [1] Since transversal chromatic aberrations (TCA) leads to differently scaled objects in the red, green and blue channel, it can be corrected by scaling the red and blue channel so that they match the green channel. Most applications, like Photoshop or Picture Window Pro offer TCA correction by linear scaling. This is equal to varying the d parameter in equation [1]. See http://hugin.sf.net/tutorials/tca for a method to determine these parameters. OPTIONS
-g a:b:c:d Radial distortion coefficient for all channels, (a, b, c, d) -b a:b:c:d Radial distortion coefficients for blue channel, (a, b, c, d). This is applied on top of the -g distortion coefficients, use for TCA corr -r a:b:c:d Radial distortion coefficients for red channel, (a, b, c, d). This is applied on top of the -g distortion coefficients, use for TCA corr -p Try to read radial distortion coefficients (usually supplied using -g) from the PTLens database. The environment variable PTLENS_PROFILE should point to the profile.txt file. Since newer version of the PTLens database are incompatible with fulla, download the PTLens database from the hugin sourceforge website instead: http://www.sf.net/projects/hugin -m Canon Camera manufacturer, for PTLens database query. EXIF data inside JPEG files is read, if this option is not given -n Camera Camera name, for PTLens database query. EXIF data inside JPEG files is read, if this option is not given. -l Lens Lens name, for PTLens database query if not specified, a list of possible lenses is displayed -d 50 Specify focal length in mm, for PTLens database query. EXIF data inside JPEG files is read, if this option is not given. -s Do not rescale the image to avoid black borders. -f filename Vignetting correction by flat-field division I = I / c, c = flat-field / mean(flat-field) -c a:b:c:d Radial vignetting correction by division: I = I / c, c = a + b*r^2 + c*r^4 + d*r^6 -i value Gamma of input data. used for gamma correction before and after flat-field correction -t n Number of threads that should be used during processing -h Display help summary. -o name Set output filename. If more than one image is given, the name will be uses as suffix (default suffix: _corr) -e value Compression of the output files For JPEG output: 0-100 For tiff output: DEFLATE, LZW -v Verbose AUTHORS
Written by Pablo d'Angelo. Also contains contributions from Douglas Wilkins, Ippei Ukai, Ed Halley, Bruno Postle, Gerry Patterson and Brent Townshend. This man page was written by Cyril Brulebois <cyril.brulebois@enst-bretagne.fr> and is licensed under the same terms as the hugin package itself. "Version: 2011.4.0" 2011-12-02 FULLA(1)
All times are GMT -4. The time now is 05:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy