4 ms·
ping goodhost | sed -l 's/.*/ping/' | while read line; do echo $line | say; done
by sheepz 12y ago
ping goodhost | sed -l 's/.*/ping/' | while read line; do echo $line | say; done
- n3t 12y agoYou might want to use "--unbuffered" flag in sed execution.
- sheepz 12y agothat option appears to be gnu-specific. -l should make it line-buffered
- masklinn 12y agoNote that -l is also an extension, just a BSD one. The only options in POSIX sed are -e, -f and -n (and -e is usually cargo-culted by people who want -E. -E being a BSD extension enabling extended regular expressions — -r in GNU sed)
- petercooper 12y agoBit of a tangent, but using the voice "Tom" on OS X, saying "ping" says "pling" instead. Fine with other voices but rather curious.
- deleted 12y ago[deleted]