Sponsored Content
Full Discussion: awk percentage
Top Forums Shell Programming and Scripting awk percentage Post 302241108 by Franklin52 on Sunday 28th of September 2008 12:17:26 PM
Old 09-28-2008
This is ok:

34.94 = 629/1800*100

But can you clarify this?

16.85 = <- I can't figure this out
16.77 = <- ??

Regards
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need an AWK script to calculate the percentage

Hi I need a awk script to calculate percentage. I have to pass the pararmeters in to the awk script and calculate the percentage. Sum = 50 passed = 43 failed = 7 I need to pass these value in to the awk script and calculate the percentage. Please advice me. (8 Replies)
Discussion started by: bobprabhu
8 Replies

2. Shell Programming and Scripting

awk or sed to determine battery percentage

So, I know this can be done but my awk and sed wizardry is not up to snuff for the job. Basically, I have tons and tons of Macbooks at my work and I am trying to grab the current percentage of the battery power on each client. If I use the system_profiler SPPowerDataType command it prints off... (4 Replies)
Discussion started by: tlarkin
4 Replies

3. Shell Programming and Scripting

awk/sed percentage calculation

Hi all i have a text file with columns delimited with , 2010-08-18,10,24,.09751,39,7,14872,26732 . . . i would to add a extra column in the end with percentage calculation of columns 5 and 8 ie (39/26732)*100 so the output must look like ... (6 Replies)
Discussion started by: posner
6 Replies

4. Shell Programming and Scripting

Need an awk script to calculate the percentage of value field and replace

Need an awk script to calculate the percentage of value field and replace I have a input file called file.txt with the following content: john|622.5674603562933|8|br:1;cn:3;fr:1;jp:1;us:2 andy|0.0|12|**:3;br:1;ca:2;de:2;dz:1;fr:2;nl:1 in fourth filed of input file, calulate percentage of each... (1 Reply)
Discussion started by: veeruasu
1 Replies

5. Shell Programming and Scripting

find percentage - awk

Please help me with this ... Input file /vol/test1 10G /vol/test2 1G /vol/test3 200G /vol/test4 3G Output File /vol/test1 10G - - 9G - /vol/test2 1024M - - 921M - /vol/test3 200G - - 180G - /vol/test4 3072M - - 2764M - Basically if Column 2 ( which is... (6 Replies)
Discussion started by: greycells
6 Replies

6. Shell Programming and Scripting

Calculate percentage of columns greater than certain value in a matrix using awk

This matrix represents correlation values. Is it possible to calculate the percentage of columns (a1, a2, a3) that have a value >= |0.5| and report the percentage that has positive correlation >0.5 and negative correlation <-0.5 separately. thanx in advance! input name a1 a2 a3... (5 Replies)
Discussion started by: quincyjones
5 Replies

7. Shell Programming and Scripting

awk to output the percentage of a field compared to length

The awk below using the sample input would output the following: Basically, it averages the text in $5 that matches if $7 < 30 . awk '{if(len==0){last=$5;total=$7;len=1;getline}if($5!=last){printf("%s\t%f\n", last,... (6 Replies)
Discussion started by: cmccabe
6 Replies

8. Shell Programming and Scripting

Percentage sign causing awk problems

looks like awk gets confused when there's a % next to a number. command im running: awk -F" " '/phxnaz001b/ && /vol/ && NF { if (($NF >= 80) && ($NF < 83)) { print ; print ; w++ } else if ($NF >= 83) { print ; c++ } } END { printf("%d:OK %d:WARNING %d:CRITICAL\n", o, w, c) }' /tmp/test.log ... (3 Replies)
Discussion started by: SkySmart
3 Replies

9. Shell Programming and Scripting

Help with awk percentage calculation from a file

i have a file say test with the below mentioned details Folder Name Total space Space used /test/test1 500.1GB 112.0 GB /test/test2 3.2 TB 5TB /test/test3 3TB 100GB i need to calculate percentage of each row based on total space and space used and copy... (9 Replies)
Discussion started by: venkitesh
9 Replies

10. HP-UX

Shell /awk script for Percentage

having two columns, A and B.. i need to add another column C in a file and calculate the percentage based on the column A and B. (COLUMN B/ COLUMN A *100) . "|" is delimiter separating the A and B.. need C column with the percentage value. Thanks for your help 100|50 |50% ... (6 Replies)
Discussion started by: kartikirans
6 Replies
TOSHSAT1800-IRDASETUP(1)					   User Commands					  TOSHSAT1800-IRDASETUP(1)

NAME
toshsat1800-irdasetup - IrDA setup utility for Toshiba Satellite 1800 SYNOPSIS
toshsat1800-irdasetup [options] DESCRIPTION
IrDA configurator for laptops with ALI1533 bridge (LPC47N227 SuperIO), smc-ircc and not initializing BIOS (tested on Toshiba Satellite 1800-514) to be used with Linux kernel. OPTIONS
-a, --skip-decoding-cfg skip ISA bridge decoding configuration -b, --skip-smc-ircc-cfg skip SMC-IRCC configuration -v, --vendor=VALUE look for the specified ISA bridge PCI vendor id -x, --device=VALUE look for the specified ISA bridge PCI device id -c, --cfgbase=VALUE set SMC-IRCC IO cfgbase address -s, --sirbase=VALUE set SMC-IRCC IO sirbase address -f, --firbase=VALUE set SMC-IRCC IO firbase address -m, --dma=VALUE set SMC-IRCC DMA channel -i, --irq=VALUE set SMC-IRCC IRQ -p, --print print ISA bridge configuration -h, --help show this help SEE ALSO
More detailed information in /usr/share/doc/toshset/README.IrDA or online at http://www.csai.unipa.it/peri/toshsat1800-irdasetup/ AUTHOR
toshsat1800-irdasetup was written by Daniele Peri <peri@csai.unipa.it>. This manual page was written by Roberto C. Sanchez <roberto@connexer.com>, for the Debian project (but may be used by others). toshsat1800-irdasetup August 2005 TOSHSAT1800-IRDASETUP(1)
All times are GMT -4. The time now is 05:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy