From 4d57e0a8dab2139a631a21aab862487481548702 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 22:32:59 +0200 Subject: Adding upstream version 2.23.7. Signed-off-by: Daniel Baumann --- test/bashisms/special-expansions.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/bashisms/special-expansions.sh (limited to 'test/bashisms/special-expansions.sh') diff --git a/test/bashisms/special-expansions.sh b/test/bashisms/special-expansions.sh new file mode 100644 index 0000000..93a4f7f --- /dev/null +++ b/test/bashisms/special-expansions.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +set -- foo bar moo + +echo BASHISM: ${#@} +echo BASHISM: ${#*} + +echo BASHISM: ${@%f*} +echo BASHISM: ${*%f*} +echo BASHISM: ${@%%f*} +echo BASHISM: ${*%%f*} + +echo BASHISM: ${@#*o} +echo BASHISM: ${*#*o} +echo BASHISM: ${@##*o} +echo BASHISM: ${*##*o} + +echo BASHISM: ${@/?/u} +echo BASHISM: ${*/?/u} +echo BASHISM: ${@/?/} +echo BASHISM: ${*/?/} + +echo BASHISM: ${@:2} +echo BASHISM: ${*:2} +echo BASHISM: ${@:1:1} +echo BASHISM: ${*:1:1} -- cgit v1.2.3