@googlegroups.com
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Dirk Heinrichs
Sent: Tuesday, August 25, 2015 9:59 AM
To: jenkinsci-users@googlegroups.com
Subject: Re: Bash and hard-bracket tests
Am 25.08.2015 um 15:51 schrieb Rob Mandeville:
Why does running a shell step without a shebang behave
Am 25.08.2015 um 15:51 schrieb Rob Mandeville:
> Why does running a shell step without a shebang behave differently
> than it does with a “#!/bin/bash –ex” shebang? Exactly what is being
> run without a shebang?
What sh is, depends on your OS. It may be bash, or something else.
CentOS:
# ll =s
Take the following script:
if [ foo == foo ]; then
echo foo is foo
fi
if [ foo == bar ]; then
echo foo is bar
fi
When I run this from the Linux command line, I get:
foo is foo
When I add "#!/bin/bash -ex" as a shebang, I get the expected line dump plus
the "foo is foo" line.
When I ma