Send command to a background process

前端 未结 6 1833
星月不相逢
星月不相逢 2020-11-29 09:11

I have a previously running process (process1.sh) that is running in the background with a PID of 1111 (or some other arbitrary number). How could I send something like

6条回答
  •  离开以前
    2020-11-29 09:51

    You can use the bash's coproc comamnd. (avaliable only in 4.0+) - it's like ksh's |&

    check this for examples http://wiki.bash-hackers.org/syntax/keywords/coproc

提交回复
热议问题