title: Jenkins - shell script - find parameter format not correct
body: <p><a href="https://i.stack.imgur.com/EZUwh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EZUwh.png" alt="enter image description here" /></a>
  hope one of you can help - I'm running a script in jenkins pipeline, so that I can upload source maps to rollbar, so I need to loop through the minified js files - I'm trying to do this with the FIND command but it keeps giving me an error: <strong>find parameter format not correct</strong> - script below:</p>
  <pre><code>stages {
      stage('Set correct environment link') {
          steps {
              script {
                  buildTarget = params.targetEnv
                  if(params.targetEnv.equals(&quot;prj1&quot;)){
                      linkTarget = &quot;http://xxx.xxx.xx/xxx/&quot;
                  } else if(params.targetEnv.equals(.......)..etc.
      stage('Uploading source maps to Rollbar') {
          steps {
                  sh ''' #!/bin/bash
                      # Save a short git hash, must be run from a git
                      # repository (or a child directory)
                      version=$(git rev-parse --short HEAD)
  
                      # Use the post_server_time access token, you can
                      # find one in your project access token settings
                      post_server_item=e1d04646bf614e039d0af3dec3fa03a7
  
                      echo &quot;Uploading source maps for version $version!&quot;
  
                      # We upload a source map for each resulting JavaScript
                      # file; the path depends on your build config
                      for path in $(find dist/renew -name &quot;*.js&quot;); do
                        # URL of the JavaScript file on the web server
                        url=${linkTarget}/$path
  
                        # a path to a corresponding source map file
                        source_map=&quot;@$path.map&quot;
  
                        echo &quot;Uploading source map for $url&quot;
  
                        curl --silent --show-error https://api.rollbar.com/api/1/sourcemap \
                          -F access_token=$post_server_item \
                          -F version=$version \
                          -F minified_url=$url \
                          -F source_map=$source_map \
                          &gt; /dev/null
                      done 
                  '''
          }
      }
      stage('Deploy') {
          steps {
              echo 'Deploying....'
  </code></pre>
  <p>From Bash CLI
  <a href="https://i.stack.imgur.com/98PwE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/98PwE.png" alt="enter image description here" /></a></p>