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 SUSE
radlist
RADLIST(1) Yard Radius Manual RADLIST(1)NAME
radlist - lists current on-line users and per user stats
SYNOPSIS
radlist [ -bhnstx ] [ -D|M|Y ] [ -F format_string ] [ -d day ] [ -m month ] [ -y year ] [ -u user ] [ -y year ]
DESCRIPTION
This program gives detailed statistics for current users on line (which is the default) or any user you like. Its statistics are on a per-
day/month/year base and can be used to produced useful reports. It shows on-line time and traffic, along with numbers of logins and cur-
rent port usage. Its output can be largerly customized as you prefer with a suitable format string. See FORMATS section below.
OPTIONS -b Uses a brief output format.
-t Uses a `traditional' tabular output format.
-n Skips the header when `-t' option is used.
-h Prints out usage of the command.
-F -Hformat_string
Define customized formats for output rows and the header. See FORMATS section below.
-m month
Reports statistics for month month where month is in the range 1-12.
-y year
Reports statistics for year year that is a four digits number.
-x Shows extedend information (port information).
- u user
Gets a single username database entry, i.e. select a specific username to report statistics for that user only.
-M -D -Y
Reports statistics on a dayly/monthly/yearly basis. They should be used along with d,m,y options. If not specified current date and
-M is considered.
FORMATS
radlist does allow the user to have a customized output format with the `-F' command line option (see above). The program accepts and out-
puts any character in a format string and parse it to find some %-prefixed one-letter tokens. Those `a la' printf tokens are substituted
with corresponding entry values. Normal C substitution are performed for \, ,
,
and \%. The list of legal % tokens follows, any oher
combination is parsed and ignored.
Token Value
---------------------------------------------------------
%l Username
%s Number of current sessions
%n Total number of sessions in the period specified
%t Total online time in secs
%T Total online time in HH:MM:SS format
%i Total input traffic in bytes
%I Total input traffic in KBytes
%o Total output traffic in bytes
%O Total output traffic in KBytes
%m Total traffic in bytes
%M Total traffic in KBytes
%k Mean online time per session in secs
%K Mean online time per session in HH:MM:SS format
%g Mean traffic per session in bytes
%G Mean traffic per session in KBytes
%% literal '%'
No alignment decimal values are allowed in this version of format strings.
FILES
/usr/logs/YEAR/user-stats
These are files which constitutes the yearly radlist database. They are in binary GDBM format and collect statistics on a per user
base, day by day.
/usr/logs/NAS/YEAR/detail-XX
These text files stores accounting information for every access server (NAS) listed in the clients file. Each user session is iden-
tified by a unique session-id and these accounting files store start/stop records for every single authenticated session. Informa-
tion stored in those records, but for a group of standard ones, strictly depend on the NAS model and operating system.
BUGS
The -x option apparently is not working.
SEE ALSO radiusd(8), radlast(1)builddbm(8), radtest(1), radwatch(1), radius_attributes(5)AUTHOR
Francesco Paolo Lovergine <francesco@yardradius.org>.
A complete list of contributors is contained in CREDITS file. You should get that file among other ones within your distribution and pos-
sibly installed under /usr/docs directory
COPYRIGHT
Copyright (C) 1997 Cristian Gafton. All rights reserved.
Copyright (C) 1999-2004 Francesco Paolo Lovergine. All rights reserved.
See the LICENSE file enclosed within this software for conditions of use and distribution. This is a pure ISO BSD Open Source License .
1.1 Aug 25, 2004 RADLIST(1)