I am using redhat 7.3. I want to run a script when i logout, to clean up some of the files, processes, etc. I realized that the .bash_logout file does not get executed at logout. Does anyone know how i can make it to execute each time i logout? I tried adding trap in the .bash_profile file (trap "/path/scrip" 0) but that didn't seem to work. I would really appreciate it if someone could help me.