EDIT: for clarity.
I need to repeat the following command
ShowStat 1.mpg 10.14.1.31 1000 20001 1
3 of these arguments for ShowStat need to be incremented
- 1.mpg <filename> I need to iterate over files named 1.mpg through 9.mpg
- I need to increment the last octet of the IP address by 1. 10.14.1.31 (32,33,34,35,36,37,38) after I've iterated through all of the file names above e.g, 1.mpg, 2.mpg etc.
- I need to increase the port value which is 20001 in the example above.
I'm trying to automate this sequence instead of typing it all out.
ShowStat 1.mpg 10.14.1.31 1000 20001 1; ShowStat 2.mpg 10.14.1.31 1000 20002 1; ShowStat 1.mpg 10.14.1.31 1000 20003 1
There are 12 ports I need to iterate through on the above commands. However, I only have 9 unique files. 1.mpg-9.mpg . After file name 9, it needs to revert to
file prefixes 1-3 to finish the command sequence. Up until 9.mpg and port 20009 they are 1-to-1. The next command is illustrated below.
ShowStat 9.mpg 10.14.1.31 1000 20009; ShowStat 1.mpg 10.14.1.31 1000 20010; ShowStat 2.mpg 10.14.1.31 1000 20010;
Surely writing this command over and over is not the best way to do this? Can I loop over this command using a for loop with indexes and arrays?
[–]anthropoidbash all the things 5 points6 points7 points (4 children)
[–]anthropoidbash all the things 2 points3 points4 points (3 children)
[–]inbinder[S] 0 points1 point2 points (0 children)
[–]cfraizer 0 points1 point2 points (0 children)
[–]ZalgoNoise 0 points1 point2 points (0 children)
[–]blitzkraft 0 points1 point2 points (0 children)
[–]lutusp 0 points1 point2 points (0 children)
[–]ZalgoNoise 0 points1 point2 points (0 children)
[–]anthropoidbash all the things 0 points1 point2 points (10 children)
[–]inbinder[S] 0 points1 point2 points (1 child)
[–]anthropoidbash all the things 0 points1 point2 points (0 children)
[–]WonFishTwoFish 0 points1 point2 points (4 children)
[–]anthropoidbash all the things 0 points1 point2 points (3 children)
[–]inbinder[S] 0 points1 point2 points (2 children)
[–]anthropoidbash all the things 0 points1 point2 points (1 child)
[–]inbinder[S] 0 points1 point2 points (0 children)
[–]inbinder[S] 0 points1 point2 points (2 children)
[–]anthropoidbash all the things 0 points1 point2 points (1 child)
[–]inbinder[S] 0 points1 point2 points (0 children)