This is another of my placeholders for reference.
I’ve got a FreeBSD system which is lacking some of the tools which I’ve gotten used to having, whether from Linux or Solaris.
I’ll often use the GNU tool seq to iterate through things on the command line… for example, if I’m going to ping 192.168.1.20-40, I might, at my bash prompt,
for i in `seq 20 40`; do ping 192.168.1.${i}; done
Quite handy, though FreeBSD doesn’t have it, and I haven’t installed whatever port contains it.
So… I’ll use jot, now that I’ve once again looked up what it is and how it works.
The equivalent line to that above?
for i in `jot 21 20`; do ping 192.168.1.${i}; done

View Comments ↓
thank you – that was helpful
thanks that saved me…
Oh, that’s a godsend, especially because I was in the exact opposite boat you were in. Oh, and by the way, install coreutils, then seq should be available as gseq.
[...] Links: Manpage “jot” GNU seq’s cousin on FreeBSD is… jot [...]
Or just use bash.
for i in {1..10}; do echo $x; done
oops.

Should have been “echo $i”.
Very helpful, I keep forgetting this command and keep looking up this page since I’ve switched to FreeBSD. Thanks!
Leave a Comment