Options Parsing and Keywords

Posted by jayrfink on Oct 18, 2007 1:16 AM EDT
Systhread.net; By Jason R Fink
Mail this story
Print this story

The traditional Unix utility uses options and arguments to parse command line parms that dictate how the utility should work. Long options is one way to make a utility's usage somewhat natural; for example: util --version. Some utilities use keywords and command/sub-command syntax. It is possible to combine the two without causing too much confusion.

Most system oriented scripters and programmers tend to rely upon the classic Unix model of options and/or arguments; conversely, many programs and scripts use a subcommand structure that is similar to language processing (or lexical checks). Consider that APIs generally use a lexical style interface - in a sense the natrual language idea makes sense if the script or program is going to be called by another program.

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Linux

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.