# Different sed version for different os types...
_sed() {
- if [ "${OSTYPE}" = "Linux" ]; then
+ if [[ "${OSTYPE}" = "Linux" ]]; then
sed -r "${@}"
else
sed -E "${@}"
# Main method (parses script arguments and calls command_* methods)
main() {
- OSTYPE="$(uname)"
-
COMMAND=""
set_command() {
[[ -z "${COMMAND}" ]] || _exiterr "Only one command can be executed at a time. See help (-h) for more information."
esac
}
+# Determine OS type
+OSTYPE="$(uname)"
+
# Check for missing dependencies
check_dependencies