On Fri, 17 Oct 2008, 15:02:10 +0200, 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 2) Shell configuration / variable settings / options are in a known state (the environment is as inherited, of course).
It actually _can_ have effects... I've seen such .*rc files which contained some arbitrary "cd $HOME" commands in them... To address the OPs problem, I'd add some "pwd" commands to find out which directory the script/interpreter believes to stay in. HTH, cheers. l8er manfred -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org