On Fri, Oct 17, 2008 at 06:02:10AM -0700, Randall R Schulz wrote:
On Thursday 16 October 2008 21:37, (David C. Rankin) wrote:
Randall R Schulz wrote:
On Thursday 16 October 2008 20:26, David C. Rankin wrote:
Listmates, Bash gurus
I'm stuck again with a BASH problem that I don't fully understand. ...
Nothing jumps out. But I gather we're not seeing the entire script. What does the sh-bang line look like? My guess is that it does not include the "--norc" command, which means that your ~/.bashrc is being executed. Could that be changing the current working directory?
I always recommend this sh-bang line:
#!/bin/bash --norc
I should add that this has to primary effects / motivations:
1) Faster start-up of the script, since ~/.bashrc isn't processed
There is no option required, AFAIK the bash never source ~/.bashrc nor /etc/bash.bashrc ... to test this run bash -x yourscript and compare with bash -x as interactive shell.
2) Shell configuration / variable settings / options are in a known state (the environment is as inherited, of course).
Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org