09-25-2012
I spent all morning on that and you resolved it within 3 minutes... thanks!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys,
I need some help to come out with a solution . I have seven such files but I am showing only three for convenience.
filea
a5 20
a8 16
fileb
a3 42
a7 14
filec
a5 23
a3 07
The output file shoud contain the data in table form showing first field of... (7 Replies)
Discussion started by: smriti_shridhar
7 Replies
2. Shell Programming and Scripting
Dear Shell experts,
I have 2 files with structure:
File 1: ID and count
head test_GI_count1.txt
1000094 2
10039307 1
10039641 1
10047177 11
10047359 1
1008555 2
10120302 1
10120672 13
10121776 1
10121865 32
And 2nd file:
head Protein_gi_GeneID_symbol.txt
protein_gi GeneID... (11 Replies)
Discussion started by: smitra
11 Replies
3. Shell Programming and Scripting
Hello,
I have two files which are of the following format
File 1 which has two columns
Protein_ID Substitution
NP_997239 T53R
NP_060668 V267M
NP_058515 P856A
NP_001206 T55M
NP_006601 D371Y ... (2 Replies)
Discussion started by: nans
2 Replies
4. Shell Programming and Scripting
Hi,
I want to print last column of 3 input files with awk.
cat file1.txt file2.txt file3.txt
file1.txt
1 ad 200
2 ss 300
file2.txt
1 mm 444
2 ee 555
file3.txt
1 kk 999
2 jj 555
My o/p should be :-
1 200 444 999
2 300 555 555 (3 Replies)
Discussion started by: satishmallidi
3 Replies
5. Shell Programming and Scripting
Hi,
I have multiple files that each contain one column of strings:
File1:
123abc
456def
789ghi
File2:
123abc
456def
891jkl
File3:
234mno
123abc
456def
In total I have 25 of these type of file. (5 Replies)
Discussion started by: owwow14
5 Replies
6. Shell Programming and Scripting
I would like to join two files when two columns in each file matches with each other and then produce an output when taking multiple columns.
Like I have file A
1234,ABCD,23,JOHN,NJ,USA
2345,ABCD,24,SAM,NY,USA
5678,GHIJ,24,TOM,NY,USA
5678,WXYZ,27,MAT,NJ,USA
and file B
... (2 Replies)
Discussion started by: mady135
2 Replies
7. UNIX for Dummies Questions & Answers
Hi Help,
I have two files namely a.txt and b.txt
a.txt looks like
a.txt
1 2 2
1 3 3
2 4 4
4 5 6
6 7 7
b.txt looks like,
b.txt
1 2 1
1 3 2
2 4 3
3 4 4
4 5 5 (2 Replies)
Discussion started by: Indra2011
2 Replies
8. Shell Programming and Scripting
Trying to use awk to match the contents of each line in file1 with $5 in file2. Both files are tab-delimited and there may be a space or special character in the name being matched in file2, for example in file1 the name is BRCA1 but in file2 the name is BRCA 1 or in file1 name is BCR but in file2... (6 Replies)
Discussion started by: cmccabe
6 Replies
9. UNIX for Beginners Questions & Answers
I have two files and desire to use the strings from $1 of file 1 (file1.txt) as search criteria to find matches in $2 of file 2 (file2.txt). If matches are found I want to output the entire line of file 2 (file2.txt) followed by fields $2-$11 of file 1 (file1.txt). I can find the matches, I cannot... (7 Replies)
Discussion started by: jvoot
7 Replies
10. UNIX for Beginners Questions & Answers
I've written an awk script to compare two fields in two different files and then print portions of each file on the same line when matched. It works reasonably well, but every now and again, I notice some errors and cannot seem to figure out what the issue may be and am turning to you for help.
... (2 Replies)
Discussion started by: jvoot
2 Replies
acctcms(1M) acctcms(1M)
NAME
acctcms - command summary from per-process accounting records
SYNOPSIS
[options] files
DESCRIPTION
reads one or more files, normally in the form described in acct(4). It adds all records for processes that executed identically-named com-
mands, sorts them, and writes them to the standard output, normally using an internal summary format.
Options
recognizes the following options:
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'', charac-
ters transferred, and blocks read and written, as in acctcom(1M). Output is normally sorted by total kcore-minutes.
Sort by total
CPU time, rather than total kcore-minutes.
Combine all commands invoked only once under
Sort by number of command invocations.
Any file names encountered hereafter are already in internal summary format.
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 (i.e.,
UNIX System V) style internal summary format records.
The following options can be used only with the option.
Output a prime-time-only command summary.
Output a non-prime- (offshift) time only command summary.
When and are used together, a combination prime 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.
EXAMPLES
A typical sequence for performing daily command accounting and for maintaining a running total is:
WARNINGS
Unpredictable output results if is used on new-style internal-summary-format files, or if it is not used with old style internal summary
format files.
The process mean memory size may overflow for values greater than
SEE ALSO
acct(1M), acctcom(1M), acctcon(1M), acctmerg(1M), acctprc(1M), acctsh(1M), fwtmp(1M), runacct(1M), acct(2), acct(4), utmp(4).
STANDARDS CONFORMANCE
acctcms(1M)