增加一个开关 [英] Incrementing a Switch
本文介绍了增加一个开关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建一个脚本,增加一个值,指定我指定的certian次数。例如
somescript.pl -i 192.168.1.1 -n 254
-i是我要增加的值
-n是我希望它增加多少次
文件的输出将是一个像这样的文件。
我的ip是192.168.1.1
我的ip是192.168.1.2
我的ip是192.168.1.3
等等等等
...
...
我的ip是192.168.1.254
I want to create a script that increments a value I specify a certian amount of times that I specify. for instance
somescript.pl -i 192.168.1.1 -n 254
-i is the value that I want to increment
-n is how many times I want it to increment
the output of the file would be to a file such as something like this.
my ip is 192.168.1.1
my ip is 192.168.1.2
my ip is 192.168.1.3
and so on and so
...
...
my ip is 192.168.1.254
推荐答案
发布你当前的代码,有人可以看到你被困在哪里。
Post your current code and someone can see where you''re stuck at.
@corefile
尝试这样的事情:
@corefile
Try something like this:
展开 | 选择 | Wrap | 行号
@corefile
尝试类似的东西这个:
@corefile
Try something like this:
展开 | 选择 | Wrap | 行号
这篇关于增加一个开关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文