On 24/03/20 08:15AM, Kirill Miazine wrote: > #!/bin/sh > ifconfig wg1 | \ > grep wgaip | \ > awk '{print $2} ' | \ > grep /32$ | \ > sed 's/\/32//' | \ > sort | while read x; do > ping -w 1 -c 1 $x 2>&1 > done
Just FYI, you don't need backslashes (\) here, as the command ending with a pipe is an incomplete pipeline. ;-)