coolcommands.com - the search engine for unix sysadmins :: unix commands and scripts
Sunday May 27, 2012


 Home
 Search
 Advanced Search
 Category Search
 Affiliates
 Acknowledgements
 Cool Links

Username

Password

Remember me
Forgot your password?
Create an account

Who's Online
We have 22 guests online

Newest Member

beyondimagem

Hit Counter
9133536 Visitors

cool Statistics
coolcommands:1330
Categories:83
Total queries:595500
Members:16437





Category Search coolcommands.com
Select Category:


coolcommand

awk - oneliner to compute the total of a column
Description

Here is a oneliner to compute the total of a column:

# echo file | awk 'BEGIN { i = 0} { i += $5 } END { print i }'

Note: The BEGIN statement can be omitted:

# echo file | awk '{ i += $5 } END { print i }'

For example the total resident memory in IBM AIX:

# ps auxwww | awk '{ i += $5 } END { print i }'
Example

ps auxwww | awk '{ i += $5 } END { print i }'

Return to search results

Random coolcommands

coolcommand: how to test if two strings are identical in a shell script
Example: test $string1 = $string2; [ $string1 = $string2 ]
[show me the details]
coolcommand: od - how to dump a file in different formats including octal, decimal, floating point, hex, and character format
Example: od -x file
[show me the details]
coolcommand: sysdef - to find the current and maximum value of file descriptors in hexadecimal in Sun Solaris
Example: sysdef | grep descriptors
[show me the details]
coolcommand: lsallq - list all prints defined in IBM AIX
Example: lsallq
[show me the details]

coolcommands.com - the search engine for UNIX sysadmins :: unix commands and scripts



FREE
myPMS

Password
Management
System

by

LVOware.com




Top 5 Submitters

lvo1152
audet37
kah00na32
Mariom24
lebjf00014

Top 5 Searches

Category Solaris49379
Category AIX46267
Category General UNIX43933
solaris22927
aix22116

Terms of Use
Privacy
Contact


 
coolcommands.com © 2012. All Right Reserved.
Programming by PRATTICO Consulting . Hosting by Apricusum