Sponsored Content
Full Discussion: Unique extraction of rows
Top Forums Shell Programming and Scripting Unique extraction of rows Post 302874293 by RudiC on Thursday 14th of November 2013 04:33:02 PM
Old 11-14-2013
I'm afraid we're getting nowhere with those regexes. Try this awkthingy and come back with results:
Code:
awk     '       {P=1
                 n=split (PARA, PATT)
                 for (i=3; i<=NF; i++)
                   for (j=1; j<=n; j++) if ($i==PATT[j]) delete PATT[j]
                 for (k in PATT) if (PATT[k]) P=0
                }
         P
        ' PARA="11 3 10" file | less

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

get part of file with unique & non-unique string

I have an archive file that holds a batch of statements. I would like to be able to extract a certain statement based on the unique customer # (ie. 123456). The end for each statement is noted by "ENDSTM". I can find the line number for the beginning of the statement section with sed. ... (5 Replies)
Discussion started by: andrewsc
5 Replies

2. Shell Programming and Scripting

Deleting specific rows in large files having rows greater than 100000

Hi Guys, I need help in modifying a large text file containing more than 1-2 lakh rows of data using unix commands. I am quite new to the unix language the text file contains data in a pipe delimited format sdfsdfs sdfsdfsd START_ROW sdfsd|sdfsdfsd|sdfsdfasdf|sdfsadf|sdfasdf... (9 Replies)
Discussion started by: manish2009
9 Replies

3. Shell Programming and Scripting

Shell script to count unique rows in a CSV

HI All, I have a CSV file of 30 columns separated by ,. I want to get a count of all unique rows written to a flat file. The CSV file is around 5000 rows The first column is a time stamp and I need to exclude while counting unique Thanks, Ravi (4 Replies)
Discussion started by: Nani369
4 Replies

4. Shell Programming and Scripting

Change unique file names into new unique filenames

I have 84 files with the following names splitseqs.1, spliseqs.2 etc. and I want to change the .number to a unique filename. E.g. change splitseqs.1 into splitseqs.7114_1#24 and change spliseqs.2 into splitseqs.7067_2#4 So all the current file names are unique, so are the new file names.... (1 Reply)
Discussion started by: avonm
1 Replies

5. UNIX for Dummies Questions & Answers

Delete rows with unique value for specific column

Hi all I have a file which looks like this 1234|1|Jon|some text|some text 1234|2|Jon|some text|some text 3453|5|Jon|some text|some text 6533|2|Kate|some text|some text 4567|3|Chris|some text|some text 4567|4|Maggie|some text|some text 8764|6|Maggie|some text|some text My third column is my... (9 Replies)
Discussion started by: A-V
9 Replies

6. UNIX for Dummies Questions & Answers

merging rows into new file based on rows and first column

I have 2 files, file01= 7 columns, row unknown (but few) file02= 7 columns, row unknown (but many) now I want to create an output with the first field that is shared in both of them and then subtract the results from the rest of the fields and print there e.g. file 01 James|0|50|25|10|50|30... (1 Reply)
Discussion started by: A-V
1 Replies

7. Shell Programming and Scripting

Delete unique rows - optimize script

Hi all, I have the following input - the unique row key is 1st column cat file.txt A response C request C response D request C request C response E request The desired output should be C request (7 Replies)
Discussion started by: varu0612
7 Replies

8. UNIX for Dummies Questions & Answers

Extract unique combination of rows from text files

Hi Gurus, I have 100 tab-delimited text files each with 21 columns. I want to extract only 2nd and 5th column from each text file. However, the values in both 2bd and 5th column contain duplicate values but the combination of these values in a row are not duplicate. I want to extract only those... (3 Replies)
Discussion started by: Unilearn
3 Replies

9. UNIX for Dummies Questions & Answers

Print unique lines without sort or unique

I would like to print unique lines without sort or unique. Unfortunately the server I am working on does not have sort or unique. I have not been able to contact the administrator of the server to ask him to add it for several weeks. (7 Replies)
Discussion started by: cokedude
7 Replies

10. UNIX for Dummies Questions & Answers

Removing rows that contain non-unique column entry

Background: I have a file of thousands of potential SSR primers from Batch Primer 3. I can't use primers that will contain the same sequence ID or sequence as another primer. I have some basic shell scripting skills, but not enough to handle this. What you need to know: I need to remove the... (1 Reply)
Discussion started by: msatseqs
1 Replies
shp2pcx(1)						      General Commands Manual							shp2pcx(1)

NAME
shp2pcx - extract images from a Shape (SHP) file into PCX files SYNOPSIS
shp2pcx SHAPE PREFIX PALETTE DESCRIPTION
shp2pcx converts all frames contained in a Shape file into PCX-format image files. Shape files are used for storage of all visible elements (from UI buttons to terrain features) of the games Exult supports. SHAPE is the name of the Shape file acting as the source. Frames contained therein are saved as PCX files named PREFIXnn.pcx with nn replaced by the frame number (counting from zero). All PCX files get their palette from PALETTE. Before extraction the number of frames, and the Shape's origin coordinates are shown. Additionally, extraction progress is communicated by printing a message containing the resulting file's name for every processed frame. EXAMPLES
shp2pcx orc.shp orc std.pal Takes the frames contained in the Shape file orc.shp, and saves them with the palette from std.pal into PCX files orc00.pcx, orc01.pcx, orc02.pcx, etc. AUTHOR
This manpage was written by Robert Bihlmeyer. It may be freely redistributed and modified under the terms of the GNU General Public License version 2 or higher. SEE ALSO
exult(6), pcxtoppm(1), splitshp(1) Exult 2002-03-24 shp2pcx(1)
All times are GMT -4. The time now is 05:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy