Sponsored Content
Full Discussion: find percentage - awk
Top Forums Shell Programming and Scripting find percentage - awk Post 302858101 by greycells on Saturday 28th of September 2013 03:38:17 PM
Old 09-28-2013
Nice ...Thanks ! I was testing it on Solaris ... it works now ....
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk percentage

how would you calculate percentage by per line? Given a column of 16 lines, grab each line and divide it by the sum of the entire column and multiply by 100? thanks ... (8 Replies)
Discussion started by: rockiefx
8 Replies

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

3. Shell Programming and Scripting

Need to find the percentage of the directory in the file system.

Hi All, I want to find the percentage occupied by the directory in the file system. Say, i have the file system /home/arun/work under this file system i have the directories /home/arun/work/yesterday /home/arun/work/today /home/arun/work/tomorrow The size of the file system is... (5 Replies)
Discussion started by: Arunprasad
5 Replies

4. Shell Programming and Scripting

awk script to count percentage from log file

Hi, I have a log like this : actually i want to get the log like this : where % can get from : 100 * pmTotNoRrcConnectReqSucc / pmTotNoRrcConnectReq Thanks in advance.. :) (8 Replies)
Discussion started by: justbow
8 Replies

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

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

7. Programming

Shell script to find Percentage?

Hi all, I havea log of data.log bear,10000,white bear,5000,black chicken,2000,white chicken,4000,yellow chicken,3000,black lion,6000,yellow lion,1000,white How can we have shell script to get the percentage of each animals? Thanks. (8 Replies)
Discussion started by: sabercats
8 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
Intro(9S)						    Data Structures for Drivers 						 Intro(9S)

NAME
Intro, intro - introduction to kernel data structures and properties DESCRIPTION
Section 9P describes kernel properties used by device drivers. Section 9S describes the data structures used by drivers to share informa- tion between the driver and the kernel. See Intro(9E) for an overview of device driver interfaces. In Section 9S, reference pages contain the following headings: o NAME summarizes the purpose of the structure or property. o SYNOPSIS lists the include file that defines the structure or property. o INTERFACE LEVEL describes any architecture dependencies. o DESCRIPTION provides general information about the structure or property. o STRUCTURE MEMBERS lists all accessible structure members (for Section 9S). o SEE ALSO gives sources for further information. Of the preceding headings, Section 9P reference pages contain the NAME, DESCRIPTION, and SEE ALSO fields. Every driver MUST include <sys/ddi.h> and <sys/sunddi.h>, in that order, and as final entries. The following table summarizes the STREAMS structures described in Section 9S. +-----------------------------+-----------------------------+ | Structure | Type | +-----------------------------+-----------------------------+ |copyreq |DDI/DKI | +-----------------------------+-----------------------------+ |copyresp |DDI/DKI | +-----------------------------+-----------------------------+ |datab |DDI/DKI | +-----------------------------+-----------------------------+ |fmodsw |Solaris DDI | +-----------------------------+-----------------------------+ |free_rtn |DDI/DKI | +-----------------------------+-----------------------------+ |iocblk |DDI/DKI | +-----------------------------+-----------------------------+ |linkblk |DDI/DKI | +-----------------------------+-----------------------------+ |module_info |DDI/DKI | +-----------------------------+-----------------------------+ |msgb |DDI/DKI | +-----------------------------+-----------------------------+ |qband |DDI/DKI | +-----------------------------+-----------------------------+ |qinit |DDI/DKI | +-----------------------------+-----------------------------+ |queclass |Solaris DDI | +-----------------------------+-----------------------------+ |queue |DDI/DKI | +-----------------------------+-----------------------------+ |streamtab |DDI/DKI | +-----------------------------+-----------------------------+ |stroptions |DDI/DKI | +-----------------------------+-----------------------------+ The following table summarizes structures that are not specific to STREAMS I/O. +-----------------------------+-----------------------------+ | Structure | Type | +-----------------------------+-----------------------------+ |aio_req |Solaris DDI | +-----------------------------+-----------------------------+ |buf |DDI/DKI | +-----------------------------+-----------------------------+ |cb_ops |Solaris DDI | +-----------------------------+-----------------------------+ |ddi_device_acc_attr |Solaris DDI | +-----------------------------+-----------------------------+ |ddi_dma_attr |Solaris DDI | +-----------------------------+-----------------------------+ |ddi_dma_cookie |Solaris DDI | +-----------------------------+-----------------------------+ |ddi_dma_lim_sparc |Solaris SPARC DDI | +-----------------------------+-----------------------------+ |ddi_dma_lim_x86 |Solaris x86 DDI | +-----------------------------+-----------------------------+ |ddi_dma_req |Solaris DDI | +-----------------------------+-----------------------------+ |ddi_dmae_req |Solaris x86 DDI | +-----------------------------+-----------------------------+ |ddi_idevice_cookie |Solaris DDI | +-----------------------------+-----------------------------+ |ddi_mapdev_ctl |Solaris DDI | +-----------------------------+-----------------------------+ |devmap_callback_ctl |Solaris DDI | +-----------------------------+-----------------------------+ |dev_ops |Solaris DDI | +-----------------------------+-----------------------------+ |iovec |DDI/DKI | +-----------------------------+-----------------------------+ |kstat |Solaris DDI | +-----------------------------+-----------------------------+ |kstat_intr |Solaris DDI | +-----------------------------+-----------------------------+ |kstat_io |Solaris DDI | +-----------------------------+-----------------------------+ |kstat_named |Solaris DDI | +-----------------------------+-----------------------------+ |map |DDI/DKI | +-----------------------------+-----------------------------+ |modldrv |Solaris DDI | +-----------------------------+-----------------------------+ |modlinkage |Solaris DDI | +-----------------------------+-----------------------------+ |modlstrmod |Solaris DDI | +-----------------------------+-----------------------------+ |scsi_address |Solaris DDI | +-----------------------------+-----------------------------+ |scsi_arq_status |Solaris DDI | +-----------------------------+-----------------------------+ |scsi_device |Solaris DDI | +-----------------------------+-----------------------------+ |scsi_extended_sense |Solaris DDI | +-----------------------------+-----------------------------+ |scsi_hba_tran |Solaris DDI | +-----------------------------+-----------------------------+ |scsi_inquiry |Solaris DDI | +-----------------------------+-----------------------------+ |scsi_pkt |Solaris DDI | +-----------------------------+-----------------------------+ |scsi_status |Solaris DDI | +-----------------------------+-----------------------------+ |uio |DDI/DKI | +-----------------------------+-----------------------------+ SEE ALSO
Intro(9E) NOTES
Do not declare arrays of structures as the size of the structures can change between releases. Rely only on the structure members listed in this chapter and not on unlisted members or the position of a member in a structure. SunOS 5.11 15 May 2001 Intro(9S)
All times are GMT -4. The time now is 04:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy