Many UNIX platforms support suboptions. Suboptions are useful when your application has many possible parameter values and suboptions, which are best specified by name. SGI's IRIX 6.5 documents an example of suboptions using its mount(1) command:
# mount -o rw,hard,bg,wsize=1024 speed:/usr /usr
In this example, the -o represents the option, which is then followed by an argument consisting of suboptions. The argument rw,hard,bg,wsize=1024 has several suboptions, which are separated by commas. As the example illustrates, some suboptions take arguments and others do not.
To make it easier for the application writer to parse suboptions, the function getsubopt(3) is provided. Its synopsis is as follows:
#include <stdlib.h> ...