title: error handling considers everything an error
body: <p>I made a short script that changes all files with one extension to a different extension.  Both extensions are inputted by the user through command line arguments.  I put in an if statement to handle errors but for some reason it considers everything an error and I am not sure why. I have pasted the script below.  I am rather new to bash scripting so any help would be greatly appreciated!</p>
  
  <pre><code>if [[ "$#" == 0 ]] || [[ "$1" || "$2" != "."* ]]
   then
  
  echo "Parameters are not valid"
  exit
  fi
  
  for f in *"$1"; do
      name=${f%.*}
      mv $f "$name$2"
  done
  </code></pre>