I found Walter C. Mankowski's Essential One-Liners guide online and have found it to be great! I am move beyond the guides examples and need to know how to develop multiple task execution in a one liner:

For example:

Code

perl -lane ' `ping -n 3 $F[0]` ' pinglist.txt

Simple enough. But now I want to add a "For Loop," to the operation for $i 1 . . 5, and then sleep for 10 and continue.

How do you create that in a one-liner?

Okay I determined the following:

Code

# perl -lane ' for($i=0;$i<3;$i++){`ping -n 3 $F[1]`}' nodelistB.txt

But I want the code to advance one line unitil it gets to the <3 limit, pause, and then continue forward in the file.