Let tee
duplicate the output from ping
to rev
using a process substitution (assuming you are using a shell that supports these) and to the terminal:
$ ping -c 3 stackexchange.com | tee >(rev >/tmp/rping)
ping: Warning: stackexchange.com has multiple addresses; using 151.101.65.69
PING stackexchange.com (151.101.65.69): 56 data bytes
64 bytes from 151.101.65.69: icmp_seq=0 ttl=52 time=18.887 ms
64 bytes from 151.101.65.69: icmp_seq=1 ttl=52 time=18.514 ms
64 bytes from 151.101.65.69: icmp_seq=2 ttl=52 time=18.508 ms
--- stackexchange.com ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 18.508/18.636/18.887/0.177 ms
There will be no delays in the output of the above text from ping
.
$ cat /tmp/rping
setyb atad 65 :)96.56.101.151( moc.egnahcxekcats GNIP
sm 788.81=emit 25=ltt 0=qes_pmci :96.56.101.151 morf setyb 46
sm 415.81=emit 25=ltt 1=qes_pmci :96.56.101.151 morf setyb 46
sm 805.81=emit 25=ltt 2=qes_pmci :96.56.101.151 morf setyb 46
--- scitsitats gnip moc.egnahcxekcats ---
ssol tekcap %0.0 ,deviecer stekcap 3 ,dettimsnart stekcap 3
sm 771.0/788.81/636.81/805.81 = ved-dts/xam/gva/nim pirt-dnuor