Top "Stdin" questions

Standard input (stdin, file descriptor 0) is the input stream to a program.

How do file descriptors work?

Can someone tell me why this does not work? I'm playing around with file descriptors, but feel a little lost. #!/…

bash shell stdout stdin file-descriptor
Read from File, or STDIN

I've written a command line utility that uses getopt for parsing arguments given on the command line. I would also …

python file command-line arguments stdin
How can I "intercept" Ctrl+C in a CLI application?

How can I intercept Ctrl+C (which normally would kill the process) in a CLI (command line interface) Java application? …

java command-line stdin command-line-interface copy-paste
how to redirect STDOUT to a file in PHP?

The code below almost works, but it's not what I really meant: ob_start(); echo 'xxx'; $contents = ob_get_contents(); …

php stdout stdin
How to feed mysql queries from bash

I'm trying to make a bash script that creates a mysql user and database but I can't find a way …

mysql linux bash unix stdin
I am not able to flush stdin

How to flush the stdin?? Why is it not working in the following code snippet? #include <string.h> #…

c stdin fflush
How to make ssh receive the password from stdin

How can you make SSH read the password from stdin, which it doesn't do by default?

ssh passwords stdin
How to trick an application into thinking its stdout is a terminal, not a pipe

I'm trying to do the opposite of "Detect if stdin is a terminal or pipe?". I'm running an application that's …

bash terminal pipe stdin
How do you read from stdin in python from a pipe which has no ending

I've problem to read from Standard input or pipe in python when the pipe is from a "open" (do not …

python pipe stdin
How do I check if stdin has some data?

In Python, how do you check if sys.stdin has data or not? I found that os.isatty(0) can not …

python redirect stdout stdin