Hi all, I am trying to write a command that can help me count the number of lines in the /etc/passwd file ending in bash.
I have read through other threads but am yet to find one indicating how to locate a specifc word at the end of a line. I know i will need to use the wc command but when i... (8 Replies)
Hi All,
I have a file which is having 3 columns as (string string integer)
a b 1
x y 2
p k 5
y y 4
.....
.....
Question:
I want get the unique value of column 2 in a sorted way(on column 2) and the sum of the 3rd column of the corresponding rows. e.g the above file should return the... (6 Replies)
Could anybody help with this?
I have input below .....
david,39
david,39
emelie,40
clarissa,22
bob,42
bob,42
tim,32
bob,39
david,38
emelie,47
what i want to do is count how many names there are with different ages, so output would be like this ....
david,2
emelie,2
clarissa,1... (3 Replies)
Hey everyone!
I have a tab delimited data set which I want to create an output contained the calculation of number of those lines with a certain value in 2nd and 3rd column.
my input file is like this:
ID1 1 10M AAATTTCCGG
ID2 5 4M ACGT
ID3 5 8M ACCTTGGA
ID4 5 ... (7 Replies)
Hi !
input:
A|B|C|D
A|F|C|E
A|B|I|C
A|T|I|B
As the title of the thread says, I would need to get:
1|3|2|4
I tried different variants of this command, but I don't manage to obtain what I need:
gawk 'BEGIN{FS=OFS="|"}{for(i=1; i<=NF; i++) a++} END {for (b in a) print b}' input
... (2 Replies)
Hi all:
quick question!
I have the following data that resembles some thing like this:
i am tired
tired am i
what is up
hello people cool
I want to count (or at least isolate) all of the unique elements in the 2nd column.
I have tried this:
cut -f 2 | uniq 'input'
which does... (3 Replies)
Hi, I have tab-deliminated data similar to the following:
dot is-big 2
dot is-round 3
dot is-gray 4
cat is-big 3
hot in-summer 5
I want to count the frequency of each individual "unique" value in the 1st column. Thus, the desired output would be as follows:
dot 3
cat 1
hot 1
is... (5 Replies)
I am trying to figure out to find word count of each word from my file
sample file
hi how are you
hi are you ok
sample out put
hi 1
how 1
are 1
you 1
hi 1
are 1
you 1
ok 1
wc -l filename is not helping , i think we will have to split the lines and count and then print and also... (4 Replies)
What is an efficient way of counting the number of unique values in a 400 column by 1000 row array and outputting the counts per column, assuming the unique values in the array are:
A, B, C, D
In other words the output should look like: Value COL1 COL2 COL3
A 50 51 52... (16 Replies)
I have a file abc.csv, from which I need column 24(PurchaseOrder_TotalCost) to get the sum_of_amounts with date and row count into another file say output.csv
abc.csv-
UTF-8,,,,,,,,,,,,,,,,,,,,,,,,,
... (6 Replies)
Discussion started by: Tahir_M
6 Replies
LEARN ABOUT HPUX
diskusg
diskusg(1M)diskusg(1M)NAME
diskusg - generate disk accounting data by user ID
SYNOPSIS
[options] [files]
DESCRIPTION
generates intermediate disk accounting information from data in files, or the standard input if omitted. outputs lines on the standard
output, one per user, in the following format:
uid login #blocks
where:
uid User's numerical user ID,
login User's login name, and
#blocks Total number of disk blocks allocated to this user.
normally reads only the inodes of file systems for disk accounting. In this case, files are the special filenames of these devices.
Options
recognizes the following options:
Input data is already in
output format. combines all lines for a single user into a single line.
verbose. Print a list on standard error of all files that are charged to no one.
Ignore the data on those file systems whose file system name is in
fnmlist. fnmlist is a list of file system names, separated by commas or enclosed within quotes. compares each name
in this list with the file system name stored in the volume ID if it exists.
Use file as the name of the password file to generate login names. is used by default.
Write records to
file of files that are charged to no one. Records consist of the special file name, the inode number, and the user
ID.
The output of is normally the input to (see acct(1M)) which generates total accounting records that can be merged with other accounting
records. is normally run in (see acctsh(1M)).
EXAMPLES
The following generates daily disk accounting information:
FILES
used for user- ID-to-login-name conversions
SEE ALSO acct(1M), acctsh(1M), volcopy(1M), acct(4), vxdiskusg(1M).
STANDARDS CONFORMANCE diskusg(1M)