- 论坛徽章:
- 1
|
本帖最后由 hzsjx 于 2010-03-31 10:44 编辑
Bash Reference Manual中有这么一段描述大括号扩展的:
A sequence expression takes the form {x..y[incr]}, where x and y are either integers or single characters, and incr, an optional increment, is an integer. When integers are supplied, the expression expands to each number between x and y, inclusive. Supplied integers may be prefixed with ‘0’ to force each term to have the same width. When either x or y begins with a zero, the shell attempts to force all generated terms to contain the same number of digits, zero-padding where necessary.
但是实际操作下来却没有用“0”填充,还有增量设置好像也不行,哪位高手知道原因?
附我测试结果:
dts@ubuntu1:~$ echo {01..15}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|