[Solved] Extract records based on a repeated column value
Hi guys,
I need help in making a command to find some data.
I have multiple files in which multiple records are present.. Each record is separated with a carriage return and in each record there are multiple fields with each field separated by "|"
what i want is that I want to extract all those records for which field number 9 is same...
The files are normal text files.
---------- Post updated at 01:19 AM ---------- Previous update was at 12:32 AM ----------
found it .. anyways...for anyone's reference.
Last edited by radoulov; 02-24-2012 at 06:17 PM..
Reason: Marked as solved.
This User Gave Thanks to m_usmanayub For This Post:
Hi All,
I need to select only those records having a non zero record in the first column of a comma delimited file.
Suppose my input file is having data like:
"0","01/08/2005 07:11:15",1,1,"Created",,"01/08/2005"
"0","01/08/2005 07:12:40",1,1,"Created",,"01/08/2005"... (2 Replies)
Hi all,
I would like to extract records of a file based on a condition. The file contains 47 fields, and I would like to extract only those records that match a certain value in one of the columns, e.g.
COL1 COL2 COL3 ............... COL47
1 XX 45 ... (4 Replies)
the data in my file is has no delimiters. it looks like this:
H52082320024740010PH333200612290000930 0.0020080131
D5208232002474000120070306200703060580T1502 TT 1.00
H52082320029180003PH333200702150001 30 100.0020080205
D5208232002918000120070726200707260580T1502 ... (3 Replies)
Hello Friends,
I have a file(InputFile.csv) with the following columns(the columns are pipe-delimited):
ColA|ColB|ColC|ColD|ColE|ColF
Now for this file, I have to get those records which fulfil the following condition:
If "ColB" is NOT NULL and "ColD" has values one of the following... (9 Replies)
Hi,
I look for a awk one liner for below issue.
input file
ABC 1234 abc 12345
ABC 4567 678 XYZ
xyz ght 678
ABC 787 yyuu
ABC 789 7890 777
zxr hyip hyu
mno uii 678 776
ABC ty7 888
All lines should be started with ABC as first field. If a record has another value for 1st... (7 Replies)
hello,
I have a file as follows:
F0100010 A C F0100040 A G BTA-28763-no-rs 77.2692
F0100020 A G F0100030 A T BTA-29334-no-rs 11.4989
F0100030 A T F0100020 A G BTA-29515-no-rs 127.006
F0100040 A G F0100010 A C BTA-29644-no-rs 7.29827
F0100050 A... (9 Replies)
Hello, I was looking for a way to select between the repeated entries (column1) based on the values of absolute values of column 3 (larger value). For example if the same gene id has FC value -2 and 1, I should get the output as -2. Kindly help.
GeneID Description FC ... (2 Replies)
Hi Experts,
I am new to UNIX. One of my file records are like below
220 IN C/A 515013 NULL NULL
220 IN C/A 515017 NULL NULL
225 IN C/A 333701 NULL NULL
225 IN C/A 515034 NULL NULL
225 IN C/A 499201 NULL NULL
225 IN C/A 499202 NULL NULL
The above mentioned records delimiter is... (4 Replies)
Hi,
I tried filtering the records in a csv file using "awk" command listed below.
awk -F"~" '$4 ~ /Active/{print }' inputfile > outputfile
The output always has all the entries.
The same command worked for different users from one of the forum links.
content of file I was... (3 Replies)
Discussion started by: sunilmudikonda
3 Replies
LEARN ABOUT DEBIAN
minmax
MINMAX(l) MINMAX(l)
NAME
minmax - Find extreme values in data tables
SYNOPSIS
minmax [ files] [ -C ] [ -D ] [ -H[nrec] ] [ -Idx[/dy] ] [ -L ] [ -M[flag] ] [ -: ] [ -bi[s][n] ]
DESCRIPTION
minmax reads its standard input [or from files] and finds the extreme values in each of the columns. It recognizes NaNs and will print
warnings if the number of columns vary from record to record. As an option, minmax will find the extent of the first two columns rounded
up and down to the nearest multiple of dx/dy. This output will be in the form -Rw/e/s/n which can be used directly in the command line for
other programs, or simply in column form.
xyzfile
ASCII [or binary, see -b] file(s) holding a fixed number of data columns.
OPTIONS -C Report the min/max values per column in separate columns [Default uses <min/max> format]
-D Sets longitude discontinuity to the Dateline (-180/+180) [Default is Greenwich (0-360)]. Requires -L.
-H Input file(s) has Header record(s). Number of header records can be changed by editing your .gmtdefaults file. If used, GMT default
is 1 header record.
-I Report the min/max of the first two columns to the nearest multiple of dx and dy, and output this in the form -Rw/e/s/n (unless -C
is set).
-L Indicates that the x column contains longitudes, which may be periodic in 360 degrees [Default assumes no periodicity].
-M Multiple segment file(s). Segments are separated by a special record. For ASCII files the first character must be flag [Default is
'>']. For binary files all fields must be NaN.
-: Toggles between (longitude,latitude) and (latitude,longitude) input/output. [Default is (longitude,latitude)]. Applies to geo-
graphic coordinates only. Only works when -I is selected.
-bi Selects binary input. Append s for single precision [Default is double]. Append n for the number of columns in the binary file(s).
[Default is 2 input columns].
EXAMPLES
To find the extreme values in the file ship_gravity.xygd, try
minmax ship_gravity.xygd
Output should look like
ship_gravity.xygd: N = 6992 <326.125/334.684> <-28.0711/-8.6837> <-47.7/177.6> <0.6/3544.9>
To find the extreme values in the file track.xy to the nearest 5 units and use this region to draw a line using psxy, try
psxy `minmax -I5 track.xy` track.xy -Jx1 -B5 -P > track.ps
To find the min and max values for each column, but rounded to integers, try
minmax junkfile -C -I1
SEE ALSO gmt(1gmt)
1 Jan 2004 MINMAX(l)