How could I split the long valueX string in the following bash code?
case "$1" in
value1|value2|value3|...........more values..................| valueN)
some_processing "$@"
;;
...
esac
I’m looking for splitting into separate lines.
M.b. like:
VAL+=value1
VAL+=value2
....
From the man page:
In other words, it’s a glob pattern, not a regular expression. As such, you can use IFS between pattern tokens. For example:
Note that you must escape the line continuation with a backslash, unlike the usual case where the pipe symbol will continue the line automatically. Other than that, you can break up the line the same way you would at the prompt.