Hey guys, I've been experimenting with some C shell scripting and playing with things like pipes and put together simple text based menus. I'm looking to make a C shell script that will run without asking any input from the user and then count the number of users logged onto the server at that particular moment (like a who | wc). It will do this a preset number of times with a 1min gap between each inquiry. After the preset number of runs (I'm guessing a loop is to be used) it will print the lowest numbers of users logged onto the server during the script run.
I'm looking for something that appears this way to the user:
Cycle 1 : number of users = 12
Cycle 2 : number of users = 12
Cycle 3 : number of users = 11
Cycle 4 : number of users = 10
Cycle 5 : number of users = 12
Cycle 6 : number of users = 11
Cycle 7 : number of users = 13
Cycle 8 : number of users = 12
Cycle 9 : number of users = 14
Cycle 10 : number of users = 16
Cycle 11 : number of users = 13
Cycle 12 : number of users = 13
Cycle 13 : number of users = 12
Cycle 14 : number of users = 13
Cycle 15 : number of users = 13
The smallest number of users: 10