title: Read command line arguments with input redirection operator in bash
body: <p>I need to read command line arguments. First arg is script name. second one is redirection operator i.e. "&lt;" and third one is input filename. When I tried to use "$#", I got 0. When I used "$*", it gave me nothing. I have to use "&lt;" this operator. My input file consists of all user input data. If I don't use the operator, It asks user for the input. Can someone please help me? Thank you !</p>
  
  <p>Command Line :</p>
  
  <pre><code>./script_name &lt; input_file
  </code></pre>
  
  <p>Script:</p>
  
  <pre><code> echo "$*"       # gave nothing
   echo "$#"       # gave me 0
  </code></pre>
  
  <p>I need to read input filename and store it to some variable. Then I have to change the extension of it. Any help/suggestions should be appreciated. </p>