title: bc command in bash scripts returns error on Jenkins server however runs fine in local
body: <p>I have below lines of code in my bash script which reads a file line by line and compares its float value with the given threshold. 
  This code works just fine on local (mac system) and returns the correct output.</p>
  
  <pre><code>   ........
     ........
     cat perf/perftestresult.txt | sed -n "s/^.*throughput]\\s*\\(.*,\\s\\)\\(.*\\)/\\2/p" &gt; 
     $filename
  
     buildFailed=false
     while IFS= read -r line
      do
          if [ 1 -eq "$( echo "${line} &lt; ${threshold}" | bc )" ]
          then 
              buildFailed=true
              break
          else
              continue
          fi
      done &lt; "$filename"
      echo $buildFailed
      .......
      .......
  </code></pre>
  
  <p>However, the same script returns below error when run in Jenkins pipeline. </p>
  
  <pre><code>line 141: 1: not found
  12:53:51  sh: out of range
  </code></pre>
  
  <p>Line 141 in script is the If condition</p>
  
  <p>Can someone please help me fix this issue?</p>