dollar-at-star7.sub 364 B

1234567891011121314151617181920212223242526
  1. IFS='' # testing with only empty IFS
  2. set -- this is a test
  3. printf '|%s|\n' ${1+"$@"}
  4. echo
  5. printf '|%s|\n' "${1+$@}"
  6. echo
  7. printf '|%s|\n' "$@"
  8. echo
  9. printf '|%s|\n' ${1-"$@"}
  10. printf '|%s|\n' "${1-$@}"
  11. echo
  12. : ${foo:="$@"}
  13. printf '|%s|\n' "$foo"
  14. unset foo
  15. : "${foo:=$@}"
  16. printf '|%s|\n' "$foo"
  17. unset foo
  18. printf '|%s|\n' ${foo-"$@"}
  19. printf '|%s|\n' "${foo-$@}"