On 05/22/2012 02:28 PM, Dirk Gently wrote:
why are you running sh filename.sh
when the first line of filename contains this interpreter definition: #!/bin/bash
should be bash filename.sh (but I usually just save the 2 chars.. :) Seriously, In nearly 15 years of this, I can count on one hand and still have fingers left the number of times 'sh foo.sh' has caused issues where 'bash foo.sh' did not. I guess the habit of 'sh scriptname.sh' just comes from the thousands of examples read where 'sh foo.sh' is given. In all the script examples I've seen, I think there has only been 1 or 2 examples that have shown using 'bash foo.sh'. I guess the example writers are human and lazy too. The only place I generally explicitly call bash is when rebooting to recover/replace a root password using: init=/bin/bash in the kernel line in grub. I guess I should make a point of using the interpreter specified after the #! in the future :) -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org