title: Passing a Command Line Argument and a textfile to a program
body: <p>I have a Read and Reverse Coding assignment where I need to pass a Textfile and a character (<code>-L</code>, or <code>-W</code>), depending on whether the operator wants the textfile returned in reverse by lines or by words. (I should also note that the assignment requires that nothing is asked of the user during the code. It must be decided which variation is wanted in the command line.)</p>
  
  <p>I don't need help with the code to reverse the lines or words, but do need help with understanding how to take in character and the textfile, then use them in the code. I've tried using the parameters <code>(int argc, char *argv[])</code> on the <code>main</code>, but anytime I try to pass in just the <code>-L</code> the terminal either says <code>Command not found</code> or <code>clang: error: argument to '-L' is missing (expected 1 value)</code></p>
  
  <p>Also, when my teacher passes a textfile to a program he often uses a <code>&gt;</code>. Can someone explain how to use this?</p>
  
  <p>Ex. <code>program.c &gt; hello.txt</code></p>
  
  <p>Then he would end up using that <code>.txt</code> in the program. </p>