Sponsored Content
Top Forums Shell Programming and Scripting Finding Maximum value in a column Post 302439984 by jaysean on Sunday 25th of July 2010 12:09:09 PM
Old 07-25-2010
Please see this:
There are 4 tab-delimited columns. 3rd column may have spaces in the name.

Code:
2655	96	IA	0.8179
2655	96	eugene	0.8144
2655	96	CPU	0.4275
2655	96	RMA	0.3407
2655	96	P Proc Tran CPU	0.3377
2655	96	ASUS K	0.2846
2655	96	MSI	0.1921
2655	96	LGVu	0.029
2655	96	IA	0.8373
2655	96	eugene	0.8338
2655	96	CPU	0.4469
2655	96	RMA	0.31
2655	96	P Proc Tran CPU	0.3571

Result should look like this:

Code:
2655	96	IA	0.8373
2655	96	eugene	0.8338
2655	96	CPU	0.4469
2655	96	RMA	0.3407
2655	96	P Proc Tran CPU	0.3571
2655	96	ASUS K	0.2846
2655	96	MSI	0.1921
2655	96	LGVu	0.029

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix shell script for finding top ten files of maximum size

I need to write a Unix shell script which will list top 10 files in a directory tree on basis of size. i.e. first file should be the biggest in the whole directory and all its sub directories. Please suggest any ideas (10 Replies)
Discussion started by: abhilashnair
10 Replies

2. Shell Programming and Scripting

for each different entry in column 1 extract maximum values from column 2 in unix/awk

Hello, I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2 SDF4 -0.211654 SDF4 0.978068 ... (1 Reply)
Discussion started by: Diya123
1 Replies

3. Homework & Coursework Questions

Find the Maximum value and average of a column

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am trying to complete a script which will allow me to find: a) reads a value from the keyboard. (ask the... (4 Replies)
Discussion started by: dstewie
4 Replies

4. Shell Programming and Scripting

Maximum of a column

Hi, I have a file like this a 1 2 a 5 8 a 66 100 b 1 2 b 2 3 b 111 143 d 4 5 d 4 6 e 77 727 g 7 8 How can I extract the maximum of col3 respective to col1. I meant, the output will be a 100 b 143 d 6 (1 Reply)
Discussion started by: jacobs.smith
1 Replies

5. Shell Programming and Scripting

Finding minimum maximum and average

I am trying to find the minimum maximum and average from one file which has values Received message from https://www.demandmatrix.net/app/dm/xml] in milliseconds. Received message from https://www.demandmatrix.net/app/dm/xml] in milliseconds. Received message from... (5 Replies)
Discussion started by: aroragaurav.84
5 Replies

6. Answers to Frequently Asked Questions

Finding maximum occurrence value using awk

Hi everyone, I'm a new member at the forum I have a file like this: field 2 values are either 0 or negative. file test4: 100815 -20 118125 0 143616 0 154488 0 154488 0 154488 -6 196492 -5 196492 -9 196492 -7 27332 0 29397 0 I would like to print a... (1 Reply)
Discussion started by: meet77
1 Replies

7. UNIX for Dummies Questions & Answers

Finding maximum occurrence value using awk

Hi everyone, I'm a new member at the forum I mistakenly posted this elsewhere too. I have a file like this: field 2 values are either 0 or negative. file test4: 100815 -20 118125 0 143616 0 154488 0 154488 0 154488 -6 196492 -5 196492 -9 196492 -7 27332 0... (5 Replies)
Discussion started by: meet77
5 Replies

8. Shell Programming and Scripting

Finding the maximum timestamp in a folder

I've the files in a directory in the following format having date +%Y%m%d%H YR_MNTH_2013061205 YR_MNTH_2013060107 and i need the latest file i.e; YR_MNTH_2013061205 to be moved to another folder #!/bin/ksh # Ksh 88 Version for test_time in YR* do --- done How can i achieve that !... (2 Replies)
Discussion started by: smile689
2 Replies

9. Shell Programming and Scripting

Get maximum per column from CSV file, based on date column

Hello everyone, I am using ksh on Solaris 10 and I'm gathering data in a CSV file that looks like this: 20170628-23:25:01,1,0,0,1,1,1,1,55,55,1 20170628-23:30:01,1,0,0,1,1,1,1,56,56,1 20170628-23:35:00,1,0,0,1,1,2,1,57,57,2 20170628-23:40:00,1,0,0,1,1,1,1,58,58,2... (6 Replies)
Discussion started by: ejianu
6 Replies

10. Shell Programming and Scripting

awk to find maximum and minimum from column and store in other column

Need your support for below. Please help to get required output If column 5 is INV then only consider column1 and take out duplicates/identical rows/values from column1 and then put minimum value of column6 in column7 and put maximum value in column 8 and then need to do subtract values of... (7 Replies)
Discussion started by: as7951
7 Replies
ACPI_AIBOOST(4) 					   BSD Kernel Interfaces Manual 					   ACPI_AIBOOST(4)

NAME
acpi_aiboost -- ASUS AI Booster hardware monitor SYNOPSIS
To compile this driver into the kernel, place the following line in your kernel configuration file: device acpi_aiboost Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): acpi_aiboost_load="YES" DESCRIPTION
The acpi_aiboost driver provides support for monitoring the hardware sensors in recent ASUS motherboards. The driver uses ACPI as the back- end to fetch sensor values and descriptions and provides its data via the sysctl(8) interface, under dev.acpi_aiboost.0 namespace. Descrip- tions for these values are available with sysctl -d. The acpi_aiboost driver typically has 7 sensors, depending on the motherboard and chipset: Sensor Units Typical Use CPU uK CPU Temperature MB uK MB Temperature VCC uV DC Core Voltage +3.3V uV DC +3.3 Voltage +5V uV DC +5 Voltage +12V uV DC +12 Voltage CPU RPM CPU Fan SEE ALSO
acpi(4), sysctl.conf(5) sysctl(8) HISTORY
The acpi_aiboost driver first appeared in FreeBSD 7.0. AUTHORS
The acpi_aiboost driver was written by Takanori Watanabe. This manual page was written by Juan Romero Pardines, who adapted the code for NetBSD, and adopted back to FreeBSD by Takanori Watanabe. BUGS
It's possible to modify voltages via the ACPI methods in the DSDT, but for now the driver only reports the sensors' values. CPU Q-Fan is another thing that is typically specified in the ACPI namespace, and in the future we should handle this feature (to enable or disable auto- matic/manual fan mode). BSD
March 14, 2007 BSD
All times are GMT -4. The time now is 03:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy