title: Is there a way to check whether there is any type of file extension included?
body: <p>I am aware of how to check for file extensions, however what I'm asking is if there's a way to check whether the user input was include with any file extension in general.</p>
  
  <p>for example </p>
  
  <p>./myscript index.html is with file extension </p>
  
  <p>Technically I know I could check for file extension using standard bash using something like </p>
  
  <pre><code>FILE="$1"
  FILE_EXT=${FILE##.*}
  </code></pre>
  
  <p>However issue arrises when i would have a file named <code>file.script.up.exe</code> which has multiple dots and obviously it would end my file_ext on <code>file.script</code> which is not what I want. </p>
  
  <p>Technically you could use <code>FILE_EXT=$(echo "$FILE" | awk -F . '{print $NF}')</code></p>
  
  <p>but then issue arises when the program would be launched without a file extension</p>
  
  <p><strong>So basically what I need is to create an if condition to check whether the script was launched with a file extension or not, and depending on the result of that if condition act accordingly</strong></p>
  
  <p>Any idea how to work around this?</p>