mirror of
https://github.com/natelandau/shell-scripting-templates.git
synced 2025-11-08 21:23:48 -05:00
Add user specified logfile
This commit is contained in:
@@ -334,6 +334,10 @@ _parseOptions_() {
|
|||||||
shift
|
shift
|
||||||
LOGLEVEL=${1}
|
LOGLEVEL=${1}
|
||||||
;;
|
;;
|
||||||
|
-L | --logfile)
|
||||||
|
shift
|
||||||
|
LOGFILE="${1}"
|
||||||
|
;;
|
||||||
-n | --dryrun) DRYRUN=true ;;
|
-n | --dryrun) DRYRUN=true ;;
|
||||||
-v | --verbose) VERBOSE=true ;;
|
-v | --verbose) VERBOSE=true ;;
|
||||||
-q | --quiet) QUIET=true ;;
|
-q | --quiet) QUIET=true ;;
|
||||||
@@ -362,6 +366,8 @@ _usage_() {
|
|||||||
|
|
||||||
$ $(basename "$0") --loglevel 'WARN'
|
$ $(basename "$0") --loglevel 'WARN'
|
||||||
|
|
||||||
|
-L, --logfile Full PATH to logfile. (Default is '${HOME}/logs/$(basename "$0")')
|
||||||
|
|
||||||
-n, --dryrun Non-destructive. Makes no permanent changes.
|
-n, --dryrun Non-destructive. Makes no permanent changes.
|
||||||
-q, --quiet Quiet (no output)
|
-q, --quiet Quiet (no output)
|
||||||
-v, --verbose Output more information. (Items echoed to 'verbose')
|
-v, --verbose Output more information. (Items echoed to 'verbose')
|
||||||
|
|||||||
Reference in New Issue
Block a user