Sponsored Content
Full Discussion: Those simple one liners
The Lounge What is on Your Mind? Those simple one liners Post 302793497 by Yoda on Friday 12th of April 2013 12:45:31 PM
Old 04-12-2013
I totally agree with hanson44 that one-liners usually becomes too cryptic for OPs.

It will be a pretty much straightforward solution, but putting all steps in a line can drive them crazy.

So I recommend OPs to use pgawk (“profiling gawk”) if possible to execute the solution provided that will help them see the execution traces of awk programs.

I use it myself often when I am having a tough time understanding what the heck this piece of code is doing!!
These 3 Users Gave Thanks to Yoda For This Post:
 

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

invaluable resource for shell one liners and more

Hi all, This link might help whom is seeking a quick solutions for thier daily shell needs. linkAll commands | commandlinefu.com (1 Reply)
Discussion started by: h@foorsa.biz
1 Replies

2. Shell Programming and Scripting

awk - one liners

Guys, I have a requirement like this. A file has >5K records always. Separated by "|", it has 30 fields for each line. In some lines, I am getting an odd field. say, the 15th field is supposed to be 2 characters but comes in as >2. In this case, for resolving this I need to copy the value of... (6 Replies)
Discussion started by: PikK45
6 Replies

3. Shell Programming and Scripting

awk one liners into a nice script

Hi All, I got some awk one liners, how can i split it all into a nice script? Got these: gzcat capgw0.log-201308161376632741.gz | sed -n '/2013-08-16 05:56:/,/2013-08-16 05:58:/p' > timebased.log awk -F":|," 'FNR==NR && /INFO - AId:/ {a=$0;next} END {for (i in a) print i "|" a}'... (8 Replies)
Discussion started by: batka
8 Replies

4. What is on Your Mind?

One liners, quick rant...

Hi fellas and fella-esses... There are numerous threads on here where people ask for, and often expect, solutions to difficult problems solved using _one_liners_. Why do they insist as such when it is virtually no different in execution time with well thought out indented code? Is it me... (12 Replies)
Discussion started by: wisecracker
12 Replies
HMINE(1)																  HMINE(1)

NAME
hypex - computes the Chernoff exponent between two simple categories. SYNOPSIS
hypex [-hH size] [-s stepsize] CATDUMP1 CATDUMP2 hmine -V DESCRIPTION
hypex reads two category dumps produced by dbacl(1) after learning. A category dump is obtained using the -d and -l switches, and is a textual representation of the feature weights which exist in the binary category files. Given two such category dumps for simple unigram categories, hypex calculates the Kullback Leibler divergence between the probability mod- els, and prints out exponential error exponents for Neyman-Pearson hypothesis tests under a range of threshold values. See Cover and Thomas (1991) Elements of Information Theory, Chap. 12. Note that only simple categories are supported, and the output only makes sense under appropriate theoretical conditions. This is a very specialized calculator. EXIT STATUS
hypex returns 0 on success, 1 if an error occurs. OPTIONS
-h -H Same as dbacl(1). Selects the hash sizes in powers of two. -s Stepsize for the threshold. hypex outputs exponents for different values of the threshold, within an interval bounded by the Kull- back Leibler divergences between the categories. -V Print the program version number and exit. SOURCE
The source code for the latest version of this program is available at the following locations: http://www.lbreyer.com/gpl.html http://dbacl.sourceforge.net BUGS
Doesn't work with complex categories, and theoretical assumptions are unrealistic in practice. AUTHOR
Laird A. Breyer <laird@lbreyer.com> SEE ALSO
dbacl(1), mailcross(1), mailfoot(1), mailinspect(1), mailtoe(1), regex(7) Version 1.12 Bayesian Classification Tools HMINE(1)
All times are GMT -4. The time now is 10:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy