aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/var_expansion.bash11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/var_expansion.bash b/scripts/var_expansion.bash
index 97e9587..9ba4286 100644
--- a/scripts/var_expansion.bash
+++ b/scripts/var_expansion.bash
@@ -79,6 +79,17 @@ echo ${FOO039/*(l)}
echo ${FOO039/?(l)}
echo ${FOO039/@([a-c]|[k-m])}
echo ${FOO039//@([a-c]|[k-m])}
+FOO40=("foo bar" foo bar foobar)
+FOO40=("foo bar foo" bar foo foobar)
+echo ${FOO40[@]/foo/poo}
+echo ${FOO40[@]//foo/poo}
+echo ${FOO40[@]#foo}
+echo ${FOO40[@]##f*o}
+echo ${FOO40[@]%foo}
+echo ${FOO40[@]%%f*o}
+echo ${FOO40[@]/#foo}
+echo ${FOO40[@]/%foo}
+echo ${FOO40[@]}
target="abc123abc"
echo "${target##+(ab[c])*([[:digit:]])}"
function positional_parameter_test(){