I have a simple parametrized Jenkins job that takes a file parameter. However when I try to get its original name in the build step I get a bad substitution error on bash.
Here are the instructions on getting the name
The error message I get is:
00:00:00.007 /tmp/jenkins4136900049932701838.sh: 2: /tmp/jenkins4136900049932701838.sh: Bad substitution
00:00:00.011 Build step 'Execute shell' marked build as failure
This is more of a bash question than a Jenkins question, but I wanted to give context to what I am doing.
Any suggestions why I am not able to dereference the variable ?