awk 'BEGIN{FS="\n"; RS=""} $3 > max[NR] {maxline[NR]=$0} END{ for (i in maxline) {print maxline[i]}}' input.tab
but it did not give what I expected.
There are several issues with my script.
1) $3 is for each line, but not correct within each record;
2) same issue with $0;
It seems to me the trick is the FS value and maxline[NR]=$0 in my case.
Hi,
I have a file with multiple records...and I have to select records based on first column....here is the sample file...
I01,abc,125,1a2,LBVI02
I01,abc,126,2b5,LBVI02
I02,20070530,254,abc,LLBI01
I02,20070820,111,bvd,NGBI01
I need all records with I01 in first field in one file and... (8 Replies)
Problem,
How can you pass today's date (eg) 18 into Awk and select the field representing the 18th column?
I have an output that I want to interact with based on what day it is
information=0:0 192:0 5436:0 22:99 0:0 0:0 1234:0 1359:09
DAY=date'+%d'
numbrs=`$information | awk... (2 Replies)
Hello,
I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2
SDF4 -0.211654
SDF4 0.978068
... (1 Reply)
My item was not answered on previous thread as code given did not work
I wanted to print records from file2 where comparing column 1 and 16 for both files find rows where column 16 in file 1 does not match column 16 in file 2
Here was CODE give to issue
~/unix.com$ cat f1... (0 Replies)
I want records which have more than one and different value in the second column on the below sample file.
Ex, I have the samle file below :-
XYZ 1
XYZ 3
abc 1
abc 1
qwe 2
qwe 1
qwe 3
I want to select XYZ and QWE line only. (6 Replies)
Hi experts, I have a tab-delimited file with one column containing values separated by a comma. I wish to duplicate the entire line for every value in that comma-delimited field.
For example:
$cat file
4444 4444 4444 4444
9990 2222,7777 6666 2222 ... (3 Replies)
Hello everyone,
I am using ksh on Solaris 10 and I'm gathering data in a CSV file that looks like this:
20170628-23:25:01,1,0,0,1,1,1,1,55,55,1
20170628-23:30:01,1,0,0,1,1,1,1,56,56,1
20170628-23:35:00,1,0,0,1,1,2,1,57,57,2
20170628-23:40:00,1,0,0,1,1,1,1,58,58,2... (6 Replies)
Need your support for below. Please help to get required output
If column 5 is INV then only consider column1 and take out duplicates/identical rows/values from column1 and then put minimum value of column6 in column7 and put maximum value in column 8 and then need to do subtract values of... (7 Replies)
Discussion started by: as7951
7 Replies
LEARN ABOUT DEBIAN
perlindex
PERLINDEX(1p) User Contributed Perl Documentation PERLINDEX(1p)NAME
perlindex - index and query perl manual pages
SYNOPSIS
perlindex -index
perlindex tell me where the flowers are
DESCRIPTION
""perlindex -index"" generates an AnyDBM_File index which can be searched with free text queries ""perlindex" a verbose query".
Each word of the query is searched in the index and a score is generated for each document containing it. Scores for all words are added
and the documents with the highest score are printed. All words are stemed with Porters algorithm (see Text::English) before indexing and
searching happens.
The score is computed as:
$score{$document} += $tf{$word,$document}/$maxtf{$document}
* log ($N/$n{$word});
where
$N is the number of documents in the index,
$n{$word} is the number of documents containing the word,
$tf{$word,$document}
is the number of occurances of word in the document, and
$maxtf{$document}
is the maximum freqency of any word in document.
OPTIONS
All options may be abreviated.
-maxhits maxhits
Maximum numer of hits to display. Default is 15.
-menu
-nomenu Use the matches as menu for calling "man". Default is -menu.q
-cbreak
-nocbreak Switch to cbreak in menu mode or don't. -cbreak is the default.
-verbose Generates additional information which query words have been not found in the database and which words of the query are
stopwords.
-conf Use another config than the default config (/etc/perlindex/config).
EXAMPLE
perlindex foo bar
1 3.735 lib/pod/perlbot.pod
2 2.640 lib/pod/perlsec.pod
3 2.153 lib/pod/perldata.pod
4 1.920 lib/Symbol.pm
5 1.802 lib/pod/perlsub.pod
6 1.586 lib/Getopt/Long.pm
7 1.190 lib/File/Path.pm
8 1.042 lib/pod/perlop.pod
9 0.857 lib/pod/perlre.pod
a 0.830 lib/Shell.pm
b 0.691 lib/strict.pm
c 0.691 lib/Carp.pm
d 0.680 lib/pod/perlpod.pod
e 0.680 lib/File/Find.pm
f 0.626 lib/pod/perlsyn.pod
Enter Number or 'q'>
Hitting the keys 1 to "f" will display the corresponding manual page. Hitting "q" quits. All other keys display this manual page.
FILES
The index will be generated in your man directory. Strictly speaking in "$Config{man1direxp}/.."
The following files will be generated:
index_fn # docid -> (max frequency, filename)
index_idf # term -> number of documents containing term
index_if # term -> (docid, frequency)*
index_seen # fn -> indexed?
AUTHOR
Ulrich Pfeifer <pfeifer@ls6.informatik.uni-dortmund.de>
perl v5.14.2 2012-01-26 PERLINDEX(1p)