- 論壇徽章:
- 1
|
本帖最后由 hzsjx 于 2010-03-31 10:44 編輯
Bash Reference Manual中有這么一段描述大括號(hào)擴(kuò)展的:
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.
但是實(shí)際操作下來(lái)卻沒(méi)有用“0”填充,還有增量設(shè)置好像也不行,哪位高手知道原因?
附我測(cè)試結(jié)果:
dts@ubuntu1:~$ echo {01..15}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|