I'm currently trying to make a script in bash that uses some specific numbers. It's for a different program but for the example, I'll use this basic ping script.
In this example, the script would ping 192.168.1.215, 216, etc. up to 225
for i in `seq 215 225`; do ping -c 1 -W 1 192.168.1.$i ; done
My question is - is there a way to set a variable (in this case, 'i') to a specific list of numbers, rather than a range?
For example, have it try 215, 217, and 220, specifically - without trying any numbers in between?
help foror if you prefer man page style:help -m for | less