shtk_bool_check man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

SHTK_BOOL_CHECK(3)	 BSD Library Functions Manual	    SHTK_BOOL_CHECK(3)

NAME
     shtk_bool_check — Converts a string to a boolean value

LIBRARY
     shtk_import bool

SYNOPSIS
     shtk_bool_check value [error_message]

DESCRIPTION
     The shtk_bool_check function takes the string value and returns the cor‐
     responding boolean value according to shell conventions.

RETURN VALUES
     shtk_bool_check returns 0 for any value representing truth.  These
     include the strings ‘yes’ and ‘true’, including any variations in their
     capitalization, and the integer number ‘1’.

     shtk_bool_check returns 1 for any value representing falsehood.  These
     include the strings ‘no’ and ‘false’, including any variations in their
     capitalization, and the integer number ‘0’.

EXAMPLES
	   local verbose=no
	   # Parse flags to see if verbose mode is enabled and set verbose=yes.

	   if shtk_bool_check "${verbose}"; then
	       # Print messages.
	   fi

ERRORS
     shtk_bool_check prints the error given in error_message and exits the
     shell with non-zero if the value does not represent a valid boolean
     value.  If error_message is not provided, a default message is printed.

SEE ALSO
     shtk(3), shtk_bool(3)

HISTORY
     shtk_bool_check first appeared in shtk 1.4.

BSD			       November 5, 2014				   BSD
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net