title: Defining shell variables in a jenkins shell script
body: <p>I see the below error when I try to create a shell variable in my JenkinsFile. How can I get around this issue?</p>
  
  <blockquote>
    <p>groovy.lang.MissingPropertyException: No such property: file_name for
    class: Script1</p>
  </blockquote>
  
  <pre><code>  sh"""
      file_name=`echo ${env.JOB_NAME} | sed -e 's/\\//-/g'`
      echo "file name =" $file_name
    """
  </code></pre>