From 3be121a05dcd170854a8dac6437b29f297a6ff4e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:01:11 +0200 Subject: Adding upstream version 2.23.4+deb12u1. 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