Created
December 10, 2015 10:45
-
-
Save oliwer/33ca2387f488879aa27c to your computer and use it in GitHub Desktop.
mksh IPC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<lynx> btw, in *ksh you do this: find "$@" -print0 |& while read -pd ''; do … | |
<igli> ah does that keep the while in fg? | |
<lynx> yes | |
<igli> sweet | |
<lynx> it's actually two lines | |
<lynx> you newline after find "$@" -print0 |& | |
<lynx> it's conceptually like & | |
<lynx> except stdio of find is connected to fd 'p' | |
<lynx> you can even do things like exec 3>&p | |
<igli> ah ok | |
<lynx> then echo >&3 to communicate to the subprocess | |
<lynx> later exec 3>&- to close its stdin | |
<igli> heh | |
<lynx> stderr is shared | |
<lynx> well if you need that. this is how I remote-controlled SQL*plus from ksh | |
<lynx> just started the sqlplus at begin of script, then read and wrote to when needed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment