[Gllug] Run script on last logout
Henrik Bilar
henrik at bilar.co.uk
Wed Jul 18 08:16:21 UTC 2007
Not sure if it would work, but perhaps something like this:
if [[ `w | grep $USER | wc -l ` -eq 1 ]]; then echo 'yes' ; else echo 'no'
; fi
> Hi,
>
> I would like to run a command/script from my .bash_logout file but only
> when exiting the last login to the machine (by that user). Can anyone
> suggest a way of detecting the last logout (or an alternative from using
> .bash_logout)?
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list