I'm pretty new to shell scripting and linux in general. Basically, I need to change the configuration file for logging out so that when a user logs out, a certain shell script is run.
Now, I've located the logout configuration file and opened it with vi using this command
$ vi ~/.bash_logout
At this point, I'm experiencing some very weird behavior. When I try to type a character, the cursor jumps around seemingly erratically. What could this be due to? I'm running the latest version of ubuntu.
And once I get that figured out, what's the command to run a .sh file from within this configuration file?
.bash_logout, you might as well do it from the command line. For example, if your logout action isecho byeyou could doecho "echo bye" >>.bash_logout.edit ~/.bash_logoutand a new window will open with a 'nicer' text editor. Gedit, I believe.