Hi
I have a Fixed format data file where I need to to get the total of the field at certain position in a file for a group of lines.
In this data file I need the total of all the field ats position 30:39 for each line starting with 6 and for each group startign with 5. Which means for... (27 Replies)
Hi,
I have a file that has data in it that says
00:01:48.233 1212
00:01:56.233 345
00:09:01.221 5678
00:12:23.321 93444
The file has more line than this but i just wanted to put in a snippet to ask how I would get the highest number with time stamp into another file. So from the above... (2 Replies)
Hello,
I have a text file with n lines in the following format (9 column fields):
Example:
contig00012 149606 G C 49 68 60 18 c$cccccacccccccccc^c
I need to count the number of lower-case and upper-case occurences in column 9, respectively, of the... (3 Replies)
hi
i have file as below , i want to add duplicate records like bell_bb to one record with valuve as 15 ( addition of both )
any oneline awk script to achive this ?
header 0
CAMPAIGN_NAME 1
Bell_BB 14
Bell_MONTHLY 803
SOLO_UNBEATABLE 644
Bell_BB 1
Bell_MONTHLY 25
SOLO_UNBEATABLE... (4 Replies)
Hello,
I have a main file with IP addresses like this:
Erisim var,100,172.17.241.5,4006,60,IS0799,TCP/IP
Erisim var,1003,172.17.140.4,4004,60,IS2156,TCP/IP
Erisim var,1004,172.17.140.5,4002,60,IS2636,TCP/IP
Erisim var,1005,172.17.140.5,4004,60,IS2436,TCP/IP
Erisim... (8 Replies)
I have a flat file
test.log
red,5,,,,,
green,7,,,,,
blue,4,,,,,
red,8,,,,,
green,9,,,,,
How i get a a result:
blue,4,,,,,
green,16,,,,,
red,13,,,,,
Thanks
Video tutorial on how to use code tags in The UNIX and Linux Forums. (2 Replies)
Please help me to write a script
Match with ACNO & NAME if it matched calculate the total val1 val2 val3 and val4 and GT is total of ACNO wise.please check the output
Table
-----------------
1005|ANDP|ACN|20|50|10|30
1005|ANDP|ACN|20|10|30|40
1001|AND|NAC|40|50|40|50... (22 Replies)
Hi I have file as given below
040|14300|40.0|563000
042|13200000|40.0
041|100|40.0
043|10000|40.0
045|102|40.0
I want to check
if field 4 is null then I have to place | in position 4.
result set should be
040|14300|40.0|563000
042|13200000|40.0|
041|100|40.0|
043|10000|40.0|... (9 Replies)
Trying to use awk to print the lines in file that have either REF or SNV in $3, add a header line, sort by $4 in numerical order. The below code does that already, but where I am stuck is on the last part where the total lines are counted and printed under Total_Targets, under Targets_less_than is... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT OPENSOLARIS
acctcms
acctcms(1M) System Administration Commands acctcms(1M)NAME
acctcms - command summary from process accounting records
SYNOPSIS
/usr/lib/acct/acctcms [-a [-o] [-p]] [-c] [-j] [-n] [-s]
[-t] filename...
DESCRIPTION
acctcms reads one or more filenames, normally in the form described in acct.h(3HEAD). It adds all records for processes that executed iden-
tically named commands, sorts them, and writes them to the standard output, normally using an internal summary format.
OPTIONS -a Print output in ASCII rather than in the internal summary format. The output includes command name, number of times executed, total
kcore-minutes, total CPU minutes, total real minutes, mean size (in K), mean CPU minutes per invocation, "hog factor," characters
transferred, and blocks read and written, as in acctcom(1). Output is normally sorted by total kcore-minutes.
Use the following options only with the -a option:
-o Output a (non-prime) offshift-time-only command summary.
-p Output a prime-time-only command summary.
When -o and -p are used together, a combination prime-time and non-prime-time report is produced. All the output summaries are total
usage except number of times executed, CPU minutes, and real minutes, which are split into prime and non-prime.
-c Sort by total CPU time, rather than total kcore-minutes.
-j Combine all commands invoked only once under "***other".
-n Sort by number of command invocations.
-s Any file names encountered hereafter are already in internal summary format.
-t Process all records as total accounting records. The default internal summary format splits each field into prime and non-prime-time
parts. This option combines the prime and non-prime time parts into a single field that is the total of both, and provides upward
compatibility with old style acctcms internal summary format records.
EXAMPLES
Example 1 Using the acctcms command.
A typical sequence for performing daily command accounting and for maintaining a running total is:
example% acctcms filename ... > today
example% cp total previoustotal
example% acctcms -s today previoustotal > total
example% acctcms -a -s today
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWaccu |
+-----------------------------+-----------------------------+
SEE ALSO acctcom(1), acct(1M), acctcon(1M), acctmerg(1M), acctprc(1M), acctsh(1M), fwtmp(1M), runacct(1M), acct(2), acct.h(3HEAD), utmpx(4),
attributes(5)NOTES
Unpredictable output results if -t is used on new style internal summary format files, or if it is not used with old style internal summary
format files.
SunOS 5.11 22 Feb 1999 acctcms(1M)