Extracted from Pike v7.3 release 18 at 2002-03-27.
pike.roxen.com
[Top]
Getopt

Method Getopt.get_args()


Method get_args

array(string) Getopt.get_args(array(string) argv, void|int posix_me_harder, void|int throw_errors)

Description

This function returns the remaining command line arguments after you have run Getopt.find_option or Getopt.find_all_options to find all the options in the argument list. If there are any options left not handled by Getopt.find_option or Getopt.find_all_options this function will fail.

If throw_errors has been specified Getopt.get_args will throw errors on failure. If it has been left out, or is 0 (zero), it will instead print an error message on Stdio.stderr and exit the program with result code 1 on failure.

Returns

On success a new argv array without the parsed options is returned.

See also

Getopt.find_option, Getopt.find_all_options