* On 17 Apr 2012, Derek Martin wrote: > On Tue, Apr 17, 2012 at 11:36:04AM -0500, David Champion wrote: > > TTY=$(tty); echo mymaildir | xargs -I{} sh -c "mutt -f '{}' <$TTY" > > Nice! I wasn't familiar with that usage of xargs...
It even appears to be fairly portable. BSD xargs also has -o, which does all the tty redirection for you. echo mailmaildir | xargs -o mutt -f Actually using /dev/tty should be adequate, instead of worrying about $(tty): echo mymaildir | xargs -I{} sh -c "mutt -f '{}' </dev/tty" I just have $tty defined in my interactive shells as routine matter, so I translated it directly. -- David Champion • d...@uchicago.edu • IT Services • University of Chicago
pgptpomhrolof.pgp
Description: PGP signature