And I'd like to add: If the first line of a shell build step starts with hashbang (#!), then Jenkins will simply drop the script as is into a tmp file and execute it.
Otherwise Jenkins copies the script into a tmp file and executes it using /bin/sh -xe /tmp/somefilename And /bin/sh, is just the shell used by Jenkins by default. You can change the default under Manage Jenkins -> Configure System. -- Sami 2012/4/11 Zoltan Gyarmati <zoltan.gyarm...@blumsoft.eu>: > Hi, > > it's more a bash question than jenkins, but the point is, Jenkins calls the > bash with -x option enabled, which also prints the invoked commands, with a > "+" prefix > You can disable it with with the "set +x" command form your script, try it > with this snippet: > > """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" > #!/bin/bash -x > > echo "prints the command as well" > > set +x > echo "this just prints the echo's output" > > set -x > echo "also prints the command itself again" > """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" > > > br, > Zoltan > > > > > On 04/11/2012 11:15 AM, David Aldrich wrote: > > Hi > > > > Some of my Jenkins jobs run bash shell scripts that are stored in > Subversion. The scripts are quite complex and may contain ‘for’ loops: > > > > For example: > > > > for Simulation in $SimulationsList_1 > > do > > cd $SIM_PATH_1/$Simulation > > zip -qr $SIM_PATH_1/$Simulation'_'$BUILD_NUMBER * > > done > > > > The Jenkins console output for such a loop is quite noisy. For example, the > ‘for’ statement is printed in every iteration. > > > > Is there a way of making a script command silent? For example, I would like > to make the line containing ‘for’ silent. > > > > Best regards > > > > David > > > > > > >