Why do I get kicked out of Unix session after running a Unix script?
Posted on 2014-09-09
I have a bash script that runs a few SQL Plus scripts, does a SFTP process and creates two differing log files, one for the SFTP process and one for everything else. The script completes everything successfully, writes the log files and nothing seems to be missing from the process except after running the script from the bash prompt, it asks me for a password to log back in. Not sure why it does this. It doesn't bother me except I don't think it should go into production like this. Also, I took out every single exit and it doesn't seem to change anything!
The line in the shell script is #!/bin/bash. And I run it from the command prompt as ./xyz.sh
Please let me know what ideas you may have! Thanks!