I have a CDR file and i need to print out 2 columns with their field position which matches to some constant values,
a part of input file
i need to print out the colums which matches constant "DIAL" and "NOA" values, but the field of these values changing from records to records so i cant print a constant columns like $3 and $13...
I tried something but failed, working first time on AIX,
i know the answer somewhere in the database somehow i couldnt find it.. appreciate any help,
Hi All,
I have two sets of files.
Set 1: 100 text files with extension .txt with names like 1.txt, 2.txt, 3.txt until 100.txt
Set 2: One big file with extension .dat
The text files have some records in columns like this:
0.7316431 82628
0.7248189 82577
0.7248182 81369
0.7222999... (1 Reply)
Hi Guys !
i want to search a record in file by matching two values in a record in two different columns
suppose i have 3 columns
and i want to select all those values from col1 for which in col3 has a specific value
e.g select all "john" from column1 where column 3 has a value of "20"
... (9 Replies)
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2.
- I tried to modify and use... (10 Replies)
Hi Experts,
I am trying to get the output from a matching pattern but unable to construct the awk command:
file :
aa bb cc 11
dd aa cc 33
cc 22 45 68
aa 33 44 44
dd aa cc 37
aa 33 44 67
I want the output to be : ( if $1 match to "aa" start of the line,then print $4 of that line, and... (3 Replies)
Dear All,
i have a column with values in excel table:
ATGC22327-p66
ATGC15922-p239
ATGC12710-p21743567
ATGC08037-p186
ATGC07969-p173
ATGC07345-p48534
ATGC02767-p254234
ATGC02124-p2177451
ATGC02124-p1459
ATGC01930-p3005 I need to... (6 Replies)
Hi All,
Need help in this requirement.
I have fileA with one column and fileB with 26 columns.
I need to match the value from fileA with fileB, if matches I have to return that value from fileB, and the next value, 5th and 6th values.
NOTE- the matching value's position changes in... (7 Replies)
Hi There,
I have an I/P which looks like --
1 2 3 4 5
1 2 3 4 6
4 7 8 9 9
5 6 7 8 9
I would like O/P to be ---
1 2 3 4 5
1 2 3 4 6
So, printing only the consecutive lines where $1,$2,$3,$4 are matching.
Is there any command to do this or small awk script?
Thanks, (12 Replies)
Hi, everyone
I have a dataset like this:
A B C D
A C
C D E
F G H
F D K
Y
X A
K K C Gsome of columns have no values in each line. I want to print all lines that have 1/2/3/4 values, export separately to four files. What I expected is like this:
file1
Y
file 2
A C
X Afile 3... (3 Replies)
Discussion started by: nengcheng
3 Replies
LEARN ABOUT DEBIAN
getcol
getcol(1) General Commands Manual getcol(1)Name
getcol - Extract specified columns from an ASCII table file
Synopsis
getcol [-amv][-n num][-r lines][-s num] filename [column number range]
Description
Extract specified columns from an ASCII table file
Options
filename
Name of a ASCII table file. At least one of these must be present for any values to be printed. If it is stdin or STDIN, an ASCII
table is expected as standard input. If there is no input file, standard input is assumed.
@filename
Name of a file containing a list of ASCII table files. If this is present, any other file names on the command line will be
ignored.
field range
Print value of these columns for the number of lines of the table specified by the -n argument after the skippiing the number of
lines specified by the -s argument. A value of 0 causes the entire input line to be printed.
-a Sum all numeric columns selected, printing the sum on the line following the result. Columns with no sum are filled with ___.
(Added in version 2.6.9)
-b Input is bar-separate table file
-c Add count of number of lines in each column at end
-d <number>
Number of decimal places in f.p. output
-e Compute medians of selected columns
-f Print range of values in selected columns
-h Print Starbase tab table header
-i Input is tab-separate table file
-k Print number of columns on first line
-l <number>
Number of lines to add to each line
-m Compute the means of all numeric columns selected, printing the mean on the line following the result (or the line following the sum
if -a is used). Columns with no mean are filled with ___. (Added in version 2.6.9)
-n num Print selected columns for this many lines. If not specified, all lines will be read after the number of lines specified by -s have
been skipped.
-o OR conditions insted of ANDing them
-p Print only sum, mmean, sigma, median, or range, not entries
-r @listfile
-r line range Print columns from the lines specified as either the first nonzero number on each line of the file listfile or the
comma- and hyphen- delimitied range; i.e. 1-5,10-12 will print values from lines 1, 2, 3, 4, 5, 10, 11, and 12. (added in version
2.6.12)
-s num Skip this many line before starting to print values. If not specified, no lines will be skipped.
-t Starbase (tab-separated) table output
-v Print more information about process.
Web Page
http://tdc-www.harvard.edu/software/wcstools/getcol.html
Author
Doug Mink, SAO (dmink@cfa.harvard.edu)
8 November 2001 WCSTools getcol(1)