I tried Perl and wrote the following bit of code: Now I need to not just print each line in the file to standard out but I want to ping each ip address on each line.
Any ideas?
Thanks
1: #!/usr/local/bin/perl
2:
3: if (open(MYFILE, "file1")) {
4: $line = <MYFILE>;
5...
I tried Perl and wrote the following bit of code: Now I need to not just print each line in the file to standard out but I want to ping each ip address on each line.
Any ideas?
Thanks
1: #!/usr/local/bin/perl
2:
3: if (open(MYFILE, "file1")) {
4: $line = <MYFILE>;
5...
Ok I don't have a million years to learn unix scripting
I just need the syntax to use the for loop command
I have a file with a list of IP addresses in it
I want to excute the command ping on each address in the list. In addition it should output to a file where I see the ip address of each...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.