Run commands/scripts when you log out by appending required lines to the ".logout" file in your HOME directory.
sh shell : ~/.sh_logout
bash shell : ~/.bash_logout
ksh shell : ~/.ksh_logout
tcsh / csh : ~/.logout
Next add the below line to your ".profile" file :
trap '. $HOME/.sh_logout; exit' 0
sh shell : ~/.sh_logout
bash shell : ~/.bash_logout
ksh shell : ~/.ksh_logout
tcsh / csh : ~/.logout
Next add the below line to your ".profile" file :
trap '. $HOME/.sh_logout; exit' 0
No comments :
Post a Comment