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