Thank you. I will get rid of the spaces. I am new to bash scripting hence i made that mistake.
On Wednesday, December 2, 2015 at 9:24:08 AM UTC-8, John Mellor wrote: > > Gouri quoted: > > . . . > > then > > partnerfolder = "update" > > . . . > > > > Why do you have spaces around the assignment operator? That’s not legal > in bash or any other normal shell language. > > > > > > *From:* [email protected] <javascript:> [mailto: > [email protected] <javascript:>] *On Behalf Of *Gouri Nair > *Sent:* December-02-15 11:39 > *To:* Jenkins Users > *Subject:* Command not found error on bash build script > > > > I added a simple if else statement as a part of my bash script. > > > > if [[ $xml_name = "xmlnew" ]] > > then > > partnerfolder = "update" > > else > > partnerfolder = $partner > > fi > > > > and when i run the build job, i get this error. > > + [[ xmlnew = \x\m\l\n\e\w ]] > > + partnerfolder = update > > /tmp/hudson3128957863523275001.sh: line 21: partnerfolder: command not found > > Build step 'Execute shell' marked build as failure > > Finished: FAILURE > > > > Can someone tell me what could be wrong? > > There are other jobs running on the same jenkins with if-else statements and > they seem to be working. Please help!! > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/63d8c0d9-4b7d-4452-a6c5-f724c8859952%40googlegroups.com > > <https://groups.google.com/d/msgid/jenkinsci-users/63d8c0d9-4b7d-4452-a6c5-f724c8859952%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f2b0ddff-35b6-4400-b40c-e42c1b503a3d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
