![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Regarding Shell Scripting | anilkarikkandar | UNIX for Dummies Questions & Answers | 3 | 11-20-2006 12:26 AM |
| HELP PLS!! Shell Scripting!! | Mary_xxx | Shell Programming and Scripting | 9 | 09-16-2006 07:52 AM |
| difference between AIX shell scripting and Unix shell scripting. | haroonec | Shell Programming and Scripting | 2 | 04-12-2006 09:12 AM |
| something else on shell scripting | master_6ez | Shell Programming and Scripting | 1 | 11-21-2004 11:42 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Shell scripting
I have a question about shell scripting. The first part of the script I wanted to find out how many users have logged in which I have done. (who|wc -l) The next part of the script is to find out how many users have logged in before I logged in. Now I know you need to use grep and sort in the script to get the answer. But I am not sure how to go about writing this script to get the answer. Can someone help me?
|
|
||||
|
You can use last command to get system login informations.
last <username> will give informations of the user who still logged in or closed their terminal.. We can manipulate this with the time recorded in utmp record files with last command. HTH. |
|
||||
|
I am not sure if I understand what you mean. I am a beginner in unix and writing this script in bourne shell. The project I am doing is creating a shell script in my home directory that:
1) prints the date and time (I have done this) 2) finds out how many users are logged in (I have done this) 3) reports how many users logged in before you (this where I am having the problem. I know I need to use grep and sort to get the answer) 4) reports how many users logged in after you 5) waits 10 minutes 6) repeats steps 1-4 This is the whole project I am doing. Thanks for your help |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|