title: Octave Command Line Arguments
body: <p>This may be a general question, but I'm new to octave and want to get a string from the command line.  However, I'm not sure what format the command line arguments are in.  I have attempted typing:</p>
  
  <pre><code>myscript hi
  myscript --hi
  myscript -hi
  myscript (hi)
  </code></pre>
  
  <p>at the command line but I keep on getting this error:</p>
  
  <p>error: invalid use of script "myscript filepath" in index expression</p>
  
  <p>so I'm apparently not calling this correctly.  The --hi is the format that is shown on the official website but it doesn't appear to work for me.  This script, I got off online just to test:</p>
  
  <pre><code>#! /usr/bin/octave -qf
  
  printf("%s", program_name());
  arg_list = argv();
  for i = 1:nargin
      printf(" %s", arg_list{i});
  end
  printf("\n");
  </code></pre>
  
  <p>Is there something I need to implement in order for argv to work?</p>