title: Giving input to a shell script through command line
body: <p>I have a file like this with .sh extension..</p>
  
  <pre><code>clear
  echo -n "Enter file name: "
  read FILE
  gcc -Wall -W "$FILE" &amp;&amp; ./a.out
  echo
  </code></pre>
  
  <p>When I can execute this file, it asks for a .c file and when given, it compiles and gives output of the .c file.</p>
  
  <p>For this, everytime I have to first execute this .sh file and then give it the .c file name when asked. Is there anyway, so that, I can just give the .c file in the command line itself, so that it takes that file and does the work...</p>
  
  <p>What I mean is, if I give "./file.sh somecommand cfile.c", then it takes cfile.c as input, compiles it and gives the output...</p>