MàJ Semaine du 17 au 23 novembre 2008

This commit is contained in:
olivier
2008-11-25 22:01:25 +01:00
parent 7fee67a77c
commit fa26da8678
23 changed files with 1016 additions and 0 deletions

View File

@ -0,0 +1,17 @@
#!/bin/bash
## Script permettant d'avoir le top 10 des utilisateurs ayant le plus grand nombre de connexions à cette machine
echo "Traitement en cours ..."
nombre_ligne=`last | wc -l`
nombre_reel=$(expr $nombre_ligne - 1 )
utilisateurs=`last | cut -d " " -f 1 | head -n $nombre_reel | sort | uniq -c | sort -r | head | tr -s " " | cut -d " " -f 3`
for i in $utilisateurs
do
if [ $i != "reboot" ]
then
echo -e "$i"
fi
done