Sponsored Content
Top Forums Shell Programming and Scripting remove row if string is same as previous row Post 302428653 by pseudocoder on Thursday 10th of June 2010 11:51:27 AM
Old 06-10-2010
Code:
awk '!a[$2]++' file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Value of previous row using awk

I would like to know value for previous row, in addition to current row. How would I will get value for previous row? How can I perform this with awk? (2 Replies)
Discussion started by: videsh77
2 Replies

2. Shell Programming and Scripting

ITERATION: remove row based on string value

It is my first post, hoping to get help from the forum. In a directory, I have 5000 multiple files that contains around 4000 rows with 10 columns in each file containing a unique string 'AT' located at 4th column. OM 3328 O BT 268 5.800 7.500 4.700 0.000 ... (9 Replies)
Discussion started by: asanjuan
9 Replies

3. Shell Programming and Scripting

String manipulation row by row

Dear masters, I stuck again in a very tricky situation,so need your valuable inputs. I have a file having rows as below: _Db _Database 1023 1 1 1 17.0B 0.2 1.0 _Field _Field-Name 3 2 2 11 56.2K 64.1 ... (5 Replies)
Discussion started by: patric2326
5 Replies

4. Shell Programming and Scripting

Insert row without deleting previous data using sed

Hello, I want to add a new row to a file to insert data without deleting the previous data there. Example: file a b c d Output a b newtext c (6 Replies)
Discussion started by: joseamck
6 Replies

5. Shell Programming and Scripting

Add Row from First Row (Split Row)

HI Guys, I have Below Input :- RepigA_hteis522 ReptCfiEtrBsCll_aofe MSL04_MSL2_A25_1A 0 9 MSL04_MSL2_A25_1B 0 9 MSL04_MSL2_A25_1C 0 9 RepigA ReptCfiEtrBsCll hteis522 aofe MSL04_MSL2_A25_1A 0 9 MSL04_MSL2_A25_1B 0 9 MSL04_MSL2_A25_1C 0 9 Split Data in two first row... (2 Replies)
Discussion started by: pareshkp
2 Replies

6. UNIX for Beginners Questions & Answers

Keep only the closet match of timestamped row (include headers) from file1 to precede file2 row/s

My original files are like this below and I distinguish them from the AP_ID (file1 has 572 and file2 has 544). Also, the header on file1 has “G_” pre-pended. NOTE: these are only snippets of very large files and much of the data is not present here. Original File 1: ... (36 Replies)
Discussion started by: aachave1
36 Replies

7. Shell Programming and Scripting

Extract row grater than 3 from previous value of a field

Hi, I am trying to extract data where first field unique value and 4th field of next row is grater than first row 4th field. input data is a below: 7035719974,20-jul-2016 07:42:51,07:42:51,074251,1 7035719974,20-jul-2016 07:43:57,07:43:57,074357,2 7399206761,20-jul-2016... (2 Replies)
Discussion started by: rramkrishnas
2 Replies

8. Shell Programming and Scripting

Splitting single row into multiple rows based on for every 10 digits of last field of the row

Hi ALL, We have requirement in a file, i have multiple rows. Example below: Input file rows 01,1,102319,0,0,70,26,U,1,331,000000113200000011920000001212 01,1,102319,0,1,80,20,U,1,241,00000059420000006021 I need my output file should be as mentioned below. Last field should split for... (4 Replies)
Discussion started by: kotra
4 Replies

9. Shell Programming and Scripting

Fill column from previous row

Hi, I have the following content in file ABBR DESC COL3 COL4 COL5 COL6 AAA text desc aaa text text text text text text text text text text text text BBB text desc bbb text text text text text text text text CCC ... (10 Replies)
Discussion started by: bobbygsk
10 Replies

10. UNIX for Beginners Questions & Answers

Keep only the closet match of timestamped row (include headers) from file1 to precede file2 row/s

This is a question that is related to one I had last August when I was trying to sort/merge two files by millsecond time column (in this case column 6). The script (below) that helped me last august by RudiC solved the puzzle of sorting/merging two files by time, except it gets lost when the... (0 Replies)
Discussion started by: aachave1
0 Replies
GLGETSEPARABLEFILTER(3G)												  GLGETSEPARABLEFILTER(3G)

NAME
glGetSeparableFilter - get separable convolution filter kernel images C SPECIFICATION
void glGetSeparableFilter( GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ) PARAMETERS
target The separable filter to be retrieved. Must be GL_SEPARABLE_2D. format Format of the output images. Must be one of GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_BGR GL_RGBA, GL_BGRA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA. type Data type of components in the output images. Symbolic constants GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV are accepted. row Pointer to storage for the row filter image. column Pointer to storage for the column filter image. span Pointer to storage for the span filter image (currently unused). DESCRIPTION
glGetSeparableFilter returns the two one-dimensional filter kernel images for the current separable 2D convolution filter. The row image is placed in row and the column image is placed in column according to the specifications in format and type. (In the current implementa- tion, span is not affected in any way.) No pixel transfer operations are performed on the images, but the relevant pixel storage modes are applied. Color components that are present in format but not included in the internal of the filters are returned as zero. The assignments of internal color components to the components of format are as follows: ----------------------------------------- Internal Component Resulting Component ----------------------------------------- Red Red Green Green Blue Blue Alpha Alpha Luminance Red Intensity Red ----------------------------------------- NOTES
glGetSeparableFilter is present only if GL_ARB_imaging is returned when glGetString is called with an argument of GL_EXTENSIONS. Non-separable 2D filters must be retrieved with glGetConvolutionFilter. ERRORS
GL_INVALID_ENUM is generated if target is not GL_SEPARABLE_2D. GL_INVALID_ENUM is generated if format is not one of the allowable values. GL_INVALID_ENUM is generated if type is not one of the allowable values. GL_INVALID_OPERATION is generated if glGetSeparableFilter is executed between the execution of glBegin and the corresponding execution of glEnd. GL_INVALID_OPERATION is generated if type is one of GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and format is not GL_RGB. GL_INVALID_OPERATION is generated if type is one of GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV and format is neither GL_RGBA nor GL_BGRA. ASSOCIATED GETS
glGetConvolutionParameter SEE ALSO
glGetConvolutionFilter(3G), glConvolutionParameter(3G), glSeparableFilter2D(3G) GLGETSEPARABLEFILTER(3G)
All times are GMT -4. The time now is 09:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy