Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # test.sh
- #!/bin/bash
- ./test.exe|./readb.exe -t90|./readb.exe -t91
- # pipe.sh
- #!/bin/bash
- for p in /proc/[0-9]*; do
- if [[ "`readlink $p/fd/0`" != *pipe* ]] && [[ "`readlink $p/fd/1`" != *pipe* ]]; then continue; fi;
- echo "pid: $p in:`readlink $p/fd/0` out:`readlink $p/fd/1`"
- done
- # pid: /proc/53988 in:/dev/pty0 out:pipe:[596] cmd:./test
- # pid: /proc/71072 in:pipe:[616] out:pipe:[220] cmd:./readb-t90
- # pid: /proc/69956 in:pipe:[224] out:/dev/pty0 cmd:./readb-t91
Advertisement
Add Comment
Please, Sign In to add comment