Visit Our UNIX and Linux User Community

Script to count unique number of user loged in

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script to count unique number of user loged in
# 1  
Old 09-30-2002
Question Script to count unique number of user loged in

Hi all, I am taking my first course in unix and having some problems.

I would line to create a scrip that does the following:

1) will tell me the number of users logged in. If a user is logged more than once just count it only ones.

2) want to be able to display the number of users that logged before me.

3) want to be able to display the number of user that logged after me.

4) run this process every 30 minutes.

Please help.

Peter Fana
# 2  
Old 09-30-2002
Please read our rules.
(6) Do not post classroom or homework problems.

Previous Thread | Next Thread
Test Your Knowledge in Computers #279
Difficulty: Easy
A microkernel is the near-minimum amount of software that can provide the mechanisms needed to implement an operating system (OS). These mechanisms include low-level address space management, thread management, and inter-process communication (IPC).
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

What script would I use to count the number of a term and its opposite?

Hello All, I am looking to write a script to count the number of a term and its opposite and create a new file with said list. I can get the terms to print to the file but only one or the other and not both. I tried this: grep -wi done */all.txt | grep -wiv done */all.txt > "filename" ... (5 Replies)
Discussion started by: mcesmcsc
5 Replies

2. Shell Programming and Scripting

Count number of unique values in each column of array

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)
Discussion started by: Geneanalyst
16 Replies

3. UNIX for Dummies Questions & Answers

Script to count number of rows

Hi, I need a solaris shell script to read multiple files and count number of unique name rows(strings) from those files. The input and output should be like this Input: file 1 abc cde abc ... (9 Replies)
Discussion started by: ssk250
9 Replies

4. Shell Programming and Scripting

Script to count number of files in directories

Hi All! I would like to have a script that will count the number of files at the top of the hour of soome directories and mail the results to me. I was thinking on : a=`/directory/subdirectory/ | wc -l` echo "/directory/subdirectory :$a" b=`/another_dir/subdir/ | wc -l` echo... (12 Replies)
Discussion started by: fretagi
12 Replies

5. Shell Programming and Scripting

count number of entries perl program or Unix script

Hi I have a file with number of entries name 1 123 name 1 345 name 1 65346 name2 3243 name2 24234 name 2 234234 so on ......... how to count total number of entries for name 1 and name2...and so on Please guide. (1 Reply)
Discussion started by: manigrover
1 Replies

6. Shell Programming and Scripting

Shell script to count unique rows in a CSV

HI All, I have a CSV file of 30 columns separated by ,. I want to get a count of all unique rows written to a flat file. The CSV file is around 5000 rows The first column is a time stamp and I need to exclude while counting unique Thanks, Ravi (4 Replies)
Discussion started by: Nani369
4 Replies

7. UNIX for Advanced & Expert Users

Count number of unique patterns from a log file

Hello Everyone I need your help in fixing this issue., I have a log file which has data of users logging in to an application. I want to search for a particular pattern in the log ISSessionValidated=N If this key word is found , the above 8 lines will contain the name of the user who's... (12 Replies)
Discussion started by: xtechkid
12 Replies

8. Shell Programming and Scripting

scripting - write a script that will count the number of times a particular word

hello everyone, I'm trying to learn some scripts but i cant get my head around two of them. 1. how can i write a script that will count the number of times a particular word is used in file? 2. how can i make a script that will take me to a web page from unix? if anyone could help it... (3 Replies)
Discussion started by: BigTool4u2
3 Replies

9. Shell Programming and Scripting

Script to AutoKill PIDs of LOGED in Active User

:confused: Hi i am trying to make a script through which i can get the total number of User and their PID after that kill all Users except the one by which i am currently logged in. (i m using SCO UNIX 5.06) # id of current usre < total number of current user USR=`who -u |wc -l` # id of... (2 Replies)
Discussion started by: aafflatoon
2 Replies

10. Post Here to Contact Site Administrators and Moderators

Then user who loged in befor 5 minutes

hi i am a student, i want to know how to display the users who loged in before 5 minutes, in uinx pls reply me immediately (0 Replies)
Discussion started by: roshni
0 Replies

Featured Tech Videos