Sponsored Content
Full Discussion: Use awk to log transform
Top Forums UNIX for Dummies Questions & Answers Use awk to log transform Post 302135951 by jmzcal on Thursday 13th of September 2007 07:04:54 PM
Old 09-13-2007
Use awk to log transform

Hello. I'm trying to use the awk command to convert certains fields to lgo base 2, not base 10.

I'm trying command lines like:

awk '$2 $5 $7 {print log(2)($2), log(2)($5), $7) filein.txt > fileout.txt

I'm trying to make a deadline.

Thanks for helping a newbie. Here's some fresh karma...
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to transform a string to a variable?

Hi all, I'm fairly new to shell scripting. My problem: I'm getting a string, "$XXOGL_TOP", from a database table. I then want to get the value of this variable in the shell script (which is a search path). But it doesn't dissolve but remains a string "$XXOGL_TOP". Any ideas on how to get the... (3 Replies)
Discussion started by: Kerstin
3 Replies

2. UNIX for Dummies Questions & Answers

Using awk to log transform a column in a tab-delimited text file?

How do I use awk to log transform the fifth column of a tab-delimited text file? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

3. UNIX for Dummies Questions & Answers

How to log transform a text file?

How can I log transform (log 2) a text file which is a single column of numbers? (4 Replies)
Discussion started by: evelibertine
4 Replies

4. Programming

STL transform question

Hi all, I pass to the transform algorithm two vectors, and the suma function. #include <algorithm> #include <iostream> #include <iterator> #include <vector> using namespace std; class Duo{ public: int one; int two; }; Duo suma(Duo first, Duo last){ Duo ret; ... (1 Reply)
Discussion started by: santiagorf
1 Replies

5. Shell Programming and Scripting

awk to log transform on matrix file

Hi Friends, I have an input matrix file like this Col1 Col2 Col3 Col4 R1 1 2 3 4 R2 4 5 6 7 R3 5 6 7 8 I would like to consider only the numeric values without touching the column header and the row header. I looked up on the forum's search, and I found this. But, I donno how to... (3 Replies)
Discussion started by: jacobs.smith
3 Replies

6. Shell Programming and Scripting

Add a number all the the values and log transform them using awk

Hi, is it possible to add a number to all the values in a file and log transform them using awk. thanx in advance input name c1 c2 c3 c4 r1 0 0.2 0.3 0.4 r2 0 0 0 1 r3 1 0 0 0 r4 0 0 1 ... (1 Reply)
Discussion started by: quincyjones
1 Replies

7. Shell Programming and Scripting

Transform vertical into horizontal list

Hi, I am creating a script that will pull data from database. The only thing missing now is that i have to transform the lines into horizontal list. EXAMPLE 2015-07-15 09:00:00.0 |TCSERVER01 |5354 2015-07-15 09:01:00.0 |TCSERVER01 |6899 ... (5 Replies)
Discussion started by: reignangel2003
5 Replies

8. Shell Programming and Scripting

Transform columns to matrix

The following code transform the matrix to columns. Is it possible to do it other way around ( get the input from the output) ? input y1 y2 y3 y4 y5 x1 0.3 0.5 2.3 3.1 5.1 x2 1.2 4.1 3.5 1.7 1.2 x3 3.1 2.1 1.0 4.1 2.1 x4 5.0 4.0 6.0 7.0 1.1 output x1 y1 0.3 x2 y1 1.2 x3... (1 Reply)
Discussion started by: quincyjones
1 Replies

9. Programming

Transform SQL-Query to not use subqueries

Hi, I have a working SQL-Query here, in which I'm using subqueries to get the needed result. The idea behind this, is to get a list of networks which have 2 tags set in the database. Because of the way it is stored, i get a tuple for each Tag, so I get a duplicate of all networks. The... (1 Reply)
Discussion started by: stomp
1 Replies
NEWSLOG(5)							File Formats Manual							NEWSLOG(5)

NAME
newslog - description of Usenet log files DESCRIPTION
Most log files created by Usenet programs reside in the /var/log/news directory and have a ``.log'' extension. Several versions are usu- ally kept with an additional extension such as ``.1'', ``.2'', etc. -- the higher the number, the older the log. The older versions are compressed. The scanlogs script and related utilities (see newslog(8)) are responsible for rotating and compressing these files. Some log files always have data, others only have data if there is a problem, and others are only created if a particular program is used or configuration parameter is set. The innstat script (see newslog(8)) monitors the size of all log files. The following files will only accumulate data under the direction of control.ctl(5): control.log miscctl.log newgroup.log rmgroup.log unwanted.log In order to create these files, the ``message'' and ``action'' fields of control.ctl should be chosen from the following table: Message Action Meaning all log=miscctl Log all messages by default default log=miscctl Log unknown messages newgroup doit=newgroup Create group and log message newgroup log=newgroup Log message rmgroup doit=rmgroup Remove group and log message rmgroup log=rmgroup Log message ``other'' doit=miscctl log and process the message ``other'' log=miscctl Log message Here, ``other'' refers to any other control message such as: checkgroups ihave sendme sendsys senduuname version The following is a list of log files. control.log This file maintains a count of the number of newgroup and rmgroup control messages seen for each newsgroup. The count is of the number of control messages with identical arguments, regardless if they were actually processed. All control arguments, including invalid ones, are counted. This file is updated by tally.control, which is invoked by scanlogs if either the newgroup or rmgroup logs exist. This file is not rotated. errlog This file contains the standard output and standard error of any program spawned by innd(8). The most common programs are the con- trol-message handlers found in /usr/lib/news/control. This file should be empty. Scanlogs will print the entire contents of this log file if it is non-empty. expire.log By default, when news.daily is going to expire old news articles, it writes the date to this file, followed by any output from expire(8) and the ending date. All lines but the first are indented four spaces. miscctl.log When control.ctl is configured as described above, all control messages except newgroup and rmgroup are appended to this file by writelog. There will be a summary line describing the message and the action taken, followed by the article indented by four spa- ces, and a blank line. newgroup.log When control.ctl is configured as described above, all newgroup messages are appended to this file using the same format as for mis- cctl.log. news This file logs articles received by innd. Scanlogs summarizes the rejected articles reported in this file. news.crit All critical error messages issued by innd are appended to this file via syslog(3). This log file should be empty. Scanlogs will print the entire contents of this log file if it is non-empty. You should have the following line in your syslog.conf(5) file: news.crit /var/log/news/news.crit news.err All major error messages issued by innd are appended to this file via syslog. This log file should be empty. Scanlogs will print the entire contents of this log file if it is non-empty. You should have the following line in your syslog.conf file: news.err /var/log/news/news.err news.notice All standard error messages and status messages issued by innd are appended to this file via syslog. Scanlogs uses the awk(1) script innlog.awk to summarize this file. You should have the following line in your syslog.conf file: news.notice /var/log/news/news.notice nntpsend.log The nntpsend(8) programs appends all status messages to this file. rmgroup.log When control.ctl is configured as described above, all rmgroup messages are appended to this file using the same format as for misc- ctl.log. unwanted.log This log maintains a count of the number of articles that were rejected because they were posted to newsgroups that do not exist at the local site. This file is updated by tally.unwanted and maintained in reverse numeric order (the most popular rejected group first). This file is not rotated. HISTORY
Written by Landon Curt Noll <chongo@toad.com> and Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.6, dated 1996/09/10. SEE ALSO
control.ctl(5), ctlinnd(8), expire(8), innd(8), news.daily(8), nntpsend(8), newslog(8). NEWSLOG(5)
All times are GMT -4. The time now is 03:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy