WalaWiki content from p1k3.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

19 lines
546 B

<[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.