Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to log transform a text file? Post 302564785 by jim mcnamara on Friday 14th of October 2011 03:19:36 PM
Old 10-14-2011
What language - C is one with a log2() function ready to use.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

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... (1 Reply)
Discussion started by: jmzcal
1 Replies

2. 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

3. Shell Programming and Scripting

Log file text parsing

I'm new to scripting and was wondering if there was a way to accomplish what I want below using shell script(s). If there is a log file as follows, where the id is the unique id of a process, with the timestamp of when the process began and completed displayed, would it be possible to find the... (3 Replies)
Discussion started by: dizydolly
3 Replies

4. 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

5. 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

6. 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

7. Shell Programming and Scripting

How to grep a log file for words listed in separate text file?

Hello, I want to grep a log ("server.log") for words in a separate file ("white-list.txt") and generate a separate log file containing each line that uses a word from the "white-list.txt" file. Putting that in bullet points: Search through "server.log" for lines that contain any word... (15 Replies)
Discussion started by: nbsparks
15 Replies

8. 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

9. 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

10. Shell Programming and Scripting

Match text to lines in a file, iterate backwards until text or text substring matches, print to file

hi all, trying this using shell/bash with sed/awk/grep I have two files, one containing one column, the other containing multiple columns (comma delimited). file1.txt abc12345 def12345 ghi54321 ... file2.txt abc1,text1,texta abc,text2,textb def123,text3,textc gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
PPI::Transform::UpdateCopyright(3)			User Contributed Perl Documentation			PPI::Transform::UpdateCopyright(3)

NAME
PPI::Transform::UpdateCopyright - Demonstration PPI::Transform class SYNOPSIS
my $transform = PPI::Transform::UpdateCopyright->new( name => 'Adam Kennedy' ); $transform->file('Module.pm'); DESCRIPTION
PPI::Transform::UpdateCopyright provides a demonstration of a typical PPI::Transform class. This class implements a document transform that will take the name of an author and update the copyright statement to refer to the current year, if it does not already do so. METHODS
new my $transform = PPI::Transform::UpdateCopyright->new( name => 'Adam Kennedy' ); The "new" constructor creates a new transform object for a specific author. It takes a single "name" parameter that should be the name (or longer string) for the author. Specifying the name is required to allow the changing of a subset of copyright statements that refer to you from a larger set in a file. name The "name" accessor returns the author name that the transform will be searching for copyright statements of. TO DO
- May need to overload some methods to forcefully prevent Document objects becoming children of another Node. SUPPORT
See the support section in the main module. AUTHOR
Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2009 - 2011 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.16.2 2011-02-25 PPI::Transform::UpdateCopyright(3)
All times are GMT -4. The time now is 04:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy