From 3f6c1435a4cbdf73a65639b05898a01c0dfc21ac Mon Sep 17 00:00:00 2001 From: Pete Travis Date: Wed, 1 Oct 2014 11:33:51 -0600 Subject: we might need this sles10 stuff later --- scratch/bash-3.1.orig/tests/new-exp5.sub | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 scratch/bash-3.1.orig/tests/new-exp5.sub (limited to 'scratch/bash-3.1.orig/tests/new-exp5.sub') diff --git a/scratch/bash-3.1.orig/tests/new-exp5.sub b/scratch/bash-3.1.orig/tests/new-exp5.sub new file mode 100644 index 0000000..9b3e1b3 --- /dev/null +++ b/scratch/bash-3.1.orig/tests/new-exp5.sub @@ -0,0 +1,30 @@ +x=(one two) +echo ${x[@]:1} +echo ${x[@]:0:1} + +x=(one) +echo ${x[0]:1} +echo ${x[0]:0} +echo ${x[@]:1} +echo ${x[@]:0} + +echo ${x[@]: -1} +echo ${x[@]: ${#x[@]}-1} + +x=(0 1 2 3 4 5 6 7 8 9) +echo ${x[@]:1} + +echo ${x[@]: -1} +echo ${x[@]: ${#x[@]}-1} + +set -- ${x[@]} + +echo $1 +echo ${@: -1} +echo ${@: $#-1} + +a=0123456789 + +echo ${a:1} +echo ${a: -1} +echo ${a: ${#a}-1} -- cgit