i-bash/tests/array8.sub
2009-09-12 16:47:00 +00:00

23 lines
306 B
Text

IFS=/
declare -a i
i[0]=fooq
i[1]=
i[2]=barq
i[3]=
recho "${i[*]:0}"
recho "${i[@]:0}"
recho "${i[*]/q/!}"
recho "${i[@]/q/!}"
recho "${i[*]#?}"
recho "${i[@]#?}"
# Need to complete this with case-modifying expansion examples
recho "${i[*]^?}"
recho "${i[@]^?}"
recho "${i[*]^^?}"
recho "${i[@]^^?}"