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.

18 lines
546 B

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