Hacker News new | ask | show | jobs
by sheepz 4183 days ago
ping goodhost | sed -l 's/.*/ping/' | while read line; do echo $line | say; done
2 comments

Bit of a tangent, but using the voice "Tom" on OS X, saying "ping" says "pling" instead. Fine with other voices but rather curious.
You might want to use "--unbuffered" flag in sed execution.
that option appears to be gnu-specific. -l should make it line-buffered
Note 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)