É assim que executo minhas tarefas no terminal sem usar &&
for i in google.com yahoo.com;do ping -c1 $i;echo $i;done
Semelhante a você tem que colocar este comando em um script
for i in google.com yahoo.com
do echo $i;ping -c1 $i;
done
Ambos dando a mesma saída para mim
google.com PING google.com (172.217.26.174) 56(84) bytes of data. 64
bytes from google.com (172.217.26.174): icmp_seq=1 ttl=56 time=259 ms
--- google.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev =
259.794/259.794/259.794/0.000 ms yahoo.com PING yahoo.com (98.138.253.109) 56(84) bytes of data. 64 bytes from yahoo.com
(98.138.253.109): icmp_seq=1 ttl=51 time=398 ms
--- yahoo.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev =
398.974/398.974/398.974/0.000 ms