diff options
Diffstat (limited to 'tests/dollar-at-star1.sub')
-rw-r--r-- | tests/dollar-at-star1.sub | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/dollar-at-star1.sub b/tests/dollar-at-star1.sub new file mode 100644 index 0000000..0036915 --- /dev/null +++ b/tests/dollar-at-star1.sub @@ -0,0 +1,23 @@ +# from dan douglas +expassign() +{ + typeset -a a + a=("$@") + typeset var asn + + while IFS= read -r asn; do + IFS=: command eval "$asn" + printf '%-14s... %s\n' "$asn" "$var" + done <<\EOF +var=${a[*]} +var="${a[*]}" +var=$* +var="$*" +var=${a[@]} +var="${a[@]}" +var=$@ +var="$@" +EOF +} + +expassign one:::two three:::four |