I'm looking for a way to pass an arbitrary sequence of numbers to a bash script. I know about seq. However, the key word here is arbitrary. For example:
$ ./do_foo 2,4,5
Should perform something like this:
#!/bin/bash
for i in {2,4,5}; do
foo $i
done
And, of course:
$ ./do_foo 2..5
Should also be possible and perform something like this:
#!/bin/bash
for i in {2..5}; do
foo $i
done
seqor whatever other program) in to the script (seq 2 5| your_script` ?