Purpose: Provides functions to: track and determine whether Bashful modules have been loaded; inspect the state of variables and functions; write output to STDOUT
and STDERR
.
Script: bashful.inc.sh
Unit Test Scripts: No unit test scripts exist for bashful
.
Requires Modules: None
Required By Modules: error
, opts
Function Name | Description |
---|---|
ifDebug |
Returns true if the current debugging level is greater than or equal to the specified debugging level. |
indexOf |
Searches for the first specified string within the subsequent list of string parameters, and returns the numeric index at which the searched string first occurs. |
isFunction |
Returns true if the specified function name exists as a defined function. |
isModuleLoaded |
Returns true if the specified Bashful module name has been loaded. |
isScriptInteractive |
Returns true if the currently executed script was invoked from an interactive TTY session. |
isScriptSourced |
Returns true if the currently executed script was sourced, rather than executed. |
isScriptSshCommand |
Returns true if the currently executed script was executed as an SSH command. |
isVariableSet |
Returns true if the specified variable name exists as a defined variable, and is set. |
stderr |
Echoes the piped input to STDERR , and returns the status code that was either passed in, or resulting from the last executed command. |
stderr_ifDebug |
Echoes the piped input to STDERR if the current SCRIPT_DEBUG_LEVEL is greater than or equal to the specified debug level, and returns the status code that was either passed in, or resulting from the last executed command. |
stdout |
Echoes the piped input to STDOUT , and returns the status code that was either passed in, or resulting from the last executed command. |
stdout_ifDebug |
Echoes the piped input to STDOUT if the current SCRIPT_DEBUG_LEVEL is greater than or equal to the specified debug level, and returns the status code that was either passed in, or resulting from the last executed command. |
verifyBashfulDependencies |
Verifies that all required Bashful modules have been loaded as necessary. If one or more required modules have not been loaded, generates an error message and returns a non-success status code. |
Description: Returns true if the current debugging level is greater than or equal to the specified debugging level.
Description: Searches for the first specified string within the subsequent list of string parameters, and returns the numeric index at which the searched string first occurs.
Description: Returns true if the specified function name exists as a defined function.
Description: Returns true if the specified Bashful module name has been loaded.
Description: Returns true if the currently executed script was invoked from an interactive TTY session.
Description: Returns true if the currently executed script was sourced, rather than executed.
Description: Returns true if the currently executed script was executed as an SSH command.
Description: Returns true if the specified variable name exists as a defined variable, and is set.
Description: Echoes the piped input to STDERR
, and returns the status code that was either passed in, or resulting from the last executed command.
Description: Echoes the piped input to STDERR
if the current SCRIPT_DEBUG_LEVEL
is greater than or equal to the specified debug level, and returns the status code that was either passed in, or resulting from the last executed command.
Description: Echoes the piped input to STDOUT
, and returns the status code that was either passed in, or resulting from the last executed command.
Description: Echoes the piped input to STDOUT
if the current SCRIPT_DEBUG_LEVEL
is greater than or equal to the specified debug level, and returns the status code that was either passed in, or resulting from the last executed command.
Description: Verifies that all required Bashful modules have been loaded as necessary. If one or more required modules have not been loaded, generates an error message and returns a non-success status code.