Projects / Shell Flags

Shell Flags

Shell Flags (shFlags) is a library written to greatly simplify the handling of command-line flags in Bourne based Unix shell scripts (such as those run with bash, dash, ksh, sh, and zsh). Most shell scripts use getopt for flag processing, but the different versions of getopt on various OSes make writing portable shell scripts difficult. shflags instead provides an API that doesn't change across shell and OS versions, so the script writer can be confident that the script will work.

Operating Systems

Recent releases

  •  10 May 2009 18:29

    Release Notes: Several minor bugs were fixed with this release, but the biggest change is to how non-flag arguments are handled. When coupled with the enhanced version of getopt, this release can now properly handle a mixture of flag and non-flag options anywhere on the command line.

    •  17 Nov 2008 22:02

      Release Notes: This is both a minor bugfix release and a minor new feature release. It adds several warning messages, fixes three issues, and displays the default value behind the help string when help is requested. Additionally, the coding standards have been modified slightly and officially documented. They were taken from the standards used by shUnit2 (the unit testing framework used for the unit testing).

      •  11 Jul 2008 21:20

        Release Notes: This release improves zsh 3.0 support and fixes some other minor bugs. Several additional unit tests were added to improve testing under more operating systems.

        •  21 Jun 2008 23:38

          Release Notes: This release has been tested with several OSes (Linux, Solaris, and Mac OS X) on several shells (bash, dash, ksh, pdksh, sh, and zsh).


          Project Spotlight


          A Fluent OpenStack client API for Java.


          Project Spotlight

          TurnKey TWiki Appliance

          A TWiki appliance that is easy to use and lightweight.