For some reason (?), often when I write scripts nowadays they do not work, or work only in part, and then I try with . or source and they work perfectly. I'm unsure what is causing this as the scripts ...
Is there a way for a sourced shell script to find out the path to itself? I'm mainly concerned with bash, though I have some coworkers who use tcsh. I'm guessing I may not have a ton of luck here, ...