Sponsored Content
Full Discussion: Log transformations with awk
Top Forums UNIX for Dummies Questions & Answers Log transformations with awk Post 302775951 by nemo246 on Tuesday 5th of March 2013 05:38:08 PM
Old 03-05-2013
Thanks to both of you! I tried them both, vgersh, yours worked a bit faster. I'm using unix. I modified to:

Code:
awk -F, 'FNR>1{for(i=2;i<=NF;i++) $i=log($i)/log(2)}1' OFS=, CONVFMT='%.4f' myFile

Thanks again!
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Numerical System Transformations - Lecture

Hy, I wrote new article on Numerical Systems and Transformations yesterday evening (on my C Lessons Project webpage) and would like to share it with you. If someone can help me format my text for this forum, I would appreciate it, so I culd post full article here.. Here's intro: "Our... (0 Replies)
Discussion started by: vurdlak
0 Replies

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

3. Shell Programming and Scripting

Using Awk for stream log

Hi Master, I've log in here then try parsing log become : 3GPP-IMSI,Calling-Station-Id 528111500111614,6738790448 528111500068173,6738769831 ..... it is possible to use awk? cause i 've try awk ' /\Accounting\ /{f=1} f && /\3GPP-IMSI \:\ String Value\ /{imsi=$4} f &&... (1 Reply)
Discussion started by: bowbowz
1 Replies

4. UNIX for Dummies Questions & Answers

log to columns using AWK

How can one take the log of a column using AWK?:( (4 Replies)
Discussion started by: cosmologist
4 Replies

5. Shell Programming and Scripting

Matching and replacing text with case transformations

Hi, I am trying to edit an XML file automatically but my regex and shell script knowledge is very limited. I would appreciate your help fellows. The XML file has this structure: <?xml version="1.0" encoding="UTF-8"?> <map map_file="maps/world.swf" zoom="350%" zoom_x="-115%"... (1 Reply)
Discussion started by: boonymagique
1 Replies

6. UNIX for Dummies Questions & Answers

awk and log files

Hello, I have a series of logs that I need to analyse. each looks something like:234.10.72.175 Mon Mar 02 20:25:00 GMT 2009 226.91.87.86 Thu Mar 05 03:50:26 GMT 2009 226.91.87.86 Thu Mar 05 04:06:07 GMT 2009 Using awk, so far I have been able to count the lines in a... (5 Replies)
Discussion started by: Freaky
5 Replies

7. Shell Programming and Scripting

Data transformations

hi all, I have oracle table which has like below example in col7 & col8 there will be values seperated , in one column it is kind of horizontal pivoting but the data is in 1 column seprated , In near future this col7 and col8 may have some more values col7 * col8 that many records it... (1 Reply)
Discussion started by: marpadga18
1 Replies

8. Shell Programming and Scripting

Need help with awk and access log

when i run this command: tail -200 /var/log/httpd/access_log | awk -F'' '{sub(/:*$/,"",$2);print $2}' i get: 13/Aug/2012:20:56 13/Aug/2012:20:56 13/Aug/2012:20:56 13/Aug/2012:20:56 13/Aug/2012:20:56 13/Aug/2012:20:56 13/Aug/2012:20:56 13/Aug/2012:20:56 13/Aug/2012:20:56... (3 Replies)
Discussion started by: SkySmart
3 Replies

9. Shell Programming and Scripting

awk to grep log

hi expert, i Have log like : dn: EPC-Per=673,HYHGU objectClass: EPC-PerSubs ownerId: 0 groupId: 4001 shareTree: nodeName=HYHGU permissions: 15 EPC-Per: 673 dn:... (2 Replies)
Discussion started by: justbow
2 Replies
xlhtml(1)						      General Commands Manual							 xlhtml(1)

NAME
xlhtml - A program for converting Microsoft Excel Files .xls SYNOPSIS
xlhtml [-a] [-asc] [-csv] [-xml] [-bcNNNNNN] [-bi/path] [-c] [-dp] [-v] [-fw] [-m] [-nc] [-nh] [-tcNNNNNN] [-te] [-xc:N-N] [-xp:N] [-xr:N- N] FILE DESCRIPTION
This manual page explains the xlhtml program. The program xlhtml is used to convert Microsoft Excel Spreadsheet files into either html or tab delimitted ASCII. The program can be interfaced with helper scripts for viewing email attachments. Most use of this program is through the helper scripts and one would probably rarely resort to using the commandline interface. OPTIONS
-a aggressively optimize html by removing </TR> </TD> or VALIGN="bottom". Some older browsers may not display properly in this mode. -asc Ascii out of -dp and extraction data (-xc, -xp, -xr) -csv Output in Comma Separated Values of -dp and extraction data (-xc, -xp, -xr) -xml Output in XML of -dp and extraction data (-xc, -xp, -xr) -bc Override the background color. e.g. -bc808080 for gray -bi Use background image. e.g. -bi/home/httpd/icon/tar.gif -c Centers the tables horizontally -dp Dump page count and max columns and rows per page -v Prints program version -fw suppress formula warnings about accuracy -m No encoding for multibyte -nc tells it not to colorize the output. -nh Suppress header and body tags in html output -tc Override the text color. e.g. -tcFF0000 for red -te Trims empty rows & columns at the edges of a worksheet -xc Columns (separated by a dash) for extraction (zero based) -xp Page for extraction (zero based), one page only -xr Rows (separated by a dash) to be extracted (zero based) An example of the extraction command line is: xlhtml -fw -asc -xp:0 -xr:2-6 -xc:0-1 Test.xls The extraction output is: Formatted output of cells by column left to right, columns separated by a tab, end of row is: 0x0A, end of file: AUTHOR
Steve Grubb, Charles N Wyble xlhtml May 15, 2002 xlhtml(1)
All times are GMT -4. The time now is 12:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy