Hook all command output within bash
Just for fun I want to pipe all output text in a terminal to espeak . For example, after this is set up I should be able to type echo hi and hear "hi" spoken, or ls and hear my directory contents listed. The only promising method to capture output I've found so far is from here: http://www.linuxjournal.com/content/bash-redirections-using-exec This is what I have so far: npipe=/tmp/$$.tmp mknod $npipe p tee /dev/tty <$npipe | espeak & espeakpid=$! exec 1>&- exec 1>$npipe trap "rm -f $npipe; kill $espeakpid" EXIT It works (also printing a bunch of "Done" jobs), but creating the named pipe,