title: How to create the folder structure and the file for a given path
body: <p>Given a file path which can exist or non exist, how to create the folder structure and file in bash script?</p>
  
  <p>Example running my script(script name and the file path is passed as the paramter): </p>
  
  <pre><code>./someTask.sh /folder/structure/file.html
  </code></pre>
  
  <p>I have tried mkdir but it creates a folder named file.html too. Any help would be much appreciated.</p>