I want to get only the number of ms from a ping command to a file Without piping to a file it works as intended. I'm a little bit lost on why > to a file does not write anything.
This works:
ping 192.168.1.1 |egrep --line-buffered -v 'PING|timeout' |sed -l -e 's/^.* time=\(.*\) ms$/\1/g'
This does not write anything to ping.dat
ping 192.168.1.1 |egrep --line-buffered -v 'PING|timeout' |sed -l -e 's/^.* time=\(.*\) ms$/\1/g' > ping.dat
What am I doing wrong?