|
|
- <[Alan]> Most of my use of seq (or under bsd, jot) seems to boil down to:
-
- $ seq 1 100 | while read i; do something with $i; done
-
- What about you?
-
-
- <[Brennen]> I kind of like
-
- for i in `seq 1 10`; do something with $i; done
-
- better than the usual 3-part for. But yeah. I'm waiting for some other structure to crop up.
-
- Hmm. I could really use a "dateseq". With GNU date(1), this is simple:
-
- #!/bin/bash
- seq 1 $1 | while read i; do date -d "+$i day"; done
-
- 'course, it should take an actual range and maybe format options.
|