Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
pwg
on Feb 14, 2019
|
parent
|
context
|
favorite
| on:
Problem solving with Unix commands
The seq provided in the GNU toolset has a -w flag to turn on "equal width" mode, so one can also get zero padded numbers out (from GNU seq) by turning on that mode and zero padding the input:
$ seq -w 0001 0003 0001 0002 0003 $
anc84
on Feb 15, 2019
[–]
Nice, this works automatically like this:
$ seq -w 98 102 098 099 100 101 102
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: