| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function render_getConfigOption { |
| |
| |
| local ACTION="$1" |
| |
| |
| local FIELD="$2" |
| |
| |
| local OPTION='' |
| |
| |
| |
| |
| if [[ "$ACTION" == '' ]];then |
| cli_printMessage "`gettext "There is no action string to work with."`" --as-error-line |
| fi |
| |
| |
| |
| if [[ ! "$FIELD" =~ '^([0-9]+|[0-9]+-|-[0-9]+|[0-9]+-[0-9]+)$' ]];then |
| cli_printMessage "`gettext "The field definition is not valid."`" --as-error-line |
| fi |
| |
| |
| OPTION=$(echo -n "$ACTION" | cut -d: -f${FIELD}) |
| |
| |
| OPTION=$(echo -n "${OPTION}" \ |
| | sed -r 's!^ *!!g' \ |
| | sed -r 's!( |,|;) *! !g' \ |
| | sed -r 's! *$!!g') |
| |
| |
| |
| |
| |
| |
| |
| |
| if [[ $OPTION != '' ]];then |
| cli_printMessage "$OPTION" --as-stdout-line |
| fi |
| |
| } |