c - So the GNU getopt only supports options in the middle? -
i'm trying getopt api:
http://www.gnu.org/s/hello/manual/libc/example-of-getopt.html#example-of-getopt
but find supports options in middle?
as find it's judging argv[optind] argv[argc-1] non-opt arguments.
is case?
gnu getopt allows options anywhere on command line. re-orders argv when parsing, though. can verify saving example code in file, compiling it, , running result:
./a.out ./a.out -a ./a.out foo ./a.out -a foo ./a.out foo -a the last 2 give same results.
Comments
Post a Comment