BSFL  0.1.0
Bash Shell Function Library
 All Files Functions Variables Groups
Functions
Miscellaneous

Functions

 die (errcode, errmsg)
 Prints an error message to stderr and exits with the error code given as parameter. The message is also logged. More...
 
 die_if_false (errcode, errmsg)
 Displays an error message and exits if the previous command has failed (if its error code is not '0'). More...
 
 die_if_true (errcode, errmsg)
 Displays an error message and exits if the previous command has succeeded (if its error code is '0'). More...
 

Detailed Description

Function Documentation

die ( errcode  ,
errmsg   
)

Prints an error message to stderr and exits with the error code given as parameter. The message is also logged.

Parameters
errcodeError code.
errmsgError message.
die_if_false ( errcode  ,
errmsg   
)

Displays an error message and exits if the previous command has failed (if its error code is not '0').

Parameters
errcodeError code.
errmsgError message.
die_if_true ( errcode  ,
errmsg   
)

Displays an error message and exits if the previous command has succeeded (if its error code is '0').

Parameters
errcodeError code.
errmsgError message.