- #!/bin/bash
- until[ $# -eq 0 ]
- do
- echo "$@"
- shift
- done
- _____________________________
- ./test.sh 1 2 3 4 5 6 7 8 9 10
- 1 2 3 4 5 6 7 8 9 10
- 2 3 4 5 6 7 8 9 10
- 3 4 5 6 7 8 9 10
- 4 5 6 7 8 9 10
- 5 6 7 8 9 10
- 6 7 8 9 10
- 7 8 9 10
- 8 9 10
- 9 10
- 10
- #该片段来自于http://www.codesnippet.cn/detail/070120148436.html
来源: http://www.codesnippet.cn/detail/070120148436.html