title: wget command not found while putting inside bash script
body: <p>I have written following bash script:</p>
  
  <pre><code> #!/bin/sh
  
  echo "Number of command line arguments : $#"
  if [ $# == 0 ]; then
     echo "Your command line contains no arguments"
     declare -a arr=("xx.xx.xx.xx" "yy.yy.yy.yy")
  else
     declare -a arr=($1)
  fi
  
  
  for i in "${arr[@]}"
  do
     URL="https://"$i":8443"
     echo "URL is $URL"
     wget --no-check-certificate $URL/heapdump
  done
  </code></pre>
  
  <p>It keeps failing with line 16: wget: command not found</p>
  
  <p>I have found some related posts but could not figure out how to fix this. Thanks.</p>