Peek at the contents of stdin
strace
?
Example below. Start a cat process which is reading stdin and writing to /tmp/foofile. Find the pid, strace it. And in the original cat window, enter some text, hey presto.
# cat >/tmp/foofile
# ps -ef|grep cat
steve 2134 1801 0 22:25 pts/2 00:00:00 cat
# strace -fp 2134
Process 2134 attached
read(0, "test\n", 65536) = 5
write(1, "test\n", 5) = 5
read(0,
To just pluck out the reads from file descriptor 0:
strace -fp 2134 -e trace=read -o "|grep read.0,"