# Utils.sh

utils.sh (opens new window) is a collection of functions to make scripting in bash easier.

utils logo

You can place uc_ variables in the head of your script to configure utils functions for your liking.

uc_ variable function description
uc_ifc_posfix ifcontinue Change default posfix ([yes/no]).
uc_gr_len gen_random Change default length (12).
uc_rn_err_msg run Change the structure of the error msg.
uc_rn_inf_msg run Change the structure of the info msg.

Each function description includes its uc_ variables with examples.

If a uc_ variable has dynamically changing parts, you'd have to use placeholders, placeholders are called using {[ name ]}:

placeholder function description
{[ rn_cmd ]} run The command executed by the run function.
{[ rn_err ]} run The error returned after executing a given command with run.

# Available functions: