0

i am stuck with error which says unexpected "("

file runs as expected in my local but when i am running script from jenkins i am seeing this error

line 13: syntax error: unexpected "("

I have this in line 13

Images=(image1 
  image2 image3 
  image4 image5 image6)
Yagami
  • 31
  • 2
  • 8
  • What does the shebang line at the start of the script say? – Jonathan Leffler Aug 09 '21 at 18:34
  • dont have shebang line at the start of the script – Yagami Aug 09 '21 at 18:51
  • For the syntax error, it is important to see the full shell script and Jenkins command running the script. I suggest you edit the question and add necessary details. – Mikko Ohtamaa Aug 09 '21 at 19:03
  • 1
    Arrays are a bash feature. They are not supported in `sh`. This error means you ran your script with `sh`, not bash. (That's why it's important to use a shebang that causes your script to be run with bash, and not invoke the script in a way that overrides or ignores that shebang). – Charles Duffy Aug 09 '21 at 19:22

0 Answers0