[Wlug] ping command expansion

Mike Frysinger vapier at gentoo.org
Wed Apr 4 18:56:41 EDT 2007


On Wednesday 04 April 2007, Chuck Noyes wrote:
> I want to ping lots and lots of consecutive ip addresses. If I issue
> ping 192.168.1.{1,2,3}, I get ping 192.168.1.1 192.168.1.2 192.168.1.3
> which isn't exactly what I want.
>
> How can I issue a "short-hand" ping command, that will expand to
> ping 192.168.1.1
> ping 192.168.1.2
> ping 192.168.1.3
> etc.

eval $(echo 'ping 192.168.1.'{1..10}';')
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
Url : http://mail.wlug.org/pipermail/wlug/attachments/20070404/7789407c/attachment.bin 


More information about the Wlug mailing list