Re: [Way OT] "#!/bin/bash" changes working directory
Dear David,
> Do you have some sort of "cd $HOME" type statement in your .bashrc or
> .bash_profile or .profile file (or similar)?
I have
-------------------------------
AUTOHOME=$PWD
# Clean up stupid automounter directory
case $PWD in
$AUTOHOME*) cd $HOME${PWD#$AUTOHOME} ;;
esac
PS1='\h[\w]% '
---------------------------------
To be honest, I had this for 10 years and never thought about it.
In any case, is there a way to avoid the change. I'd like the script
to work even if someone also has something like that...
Thanks!
Luis
Reply to: