Top "Stdin" questions

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

How do you read from stdin?

I'm trying to do some of the code golf challenges, but they all require the input to be taken from …

python stdin
How to open every file in a folder?

I have a python script parse.py, which in the script open a file, say file1, and then do something …

python file pipe stdout stdin
How to read from a file or STDIN in Bash?

The following Perl script (my.pl) can read from either the file on the command line args or from STDIN: …

bash stdin
How do I pass a string into subprocess.Popen (using the stdin argument)?

If I do the following: import subprocess from cStringIO import StringIO subprocess.Popen(['grep','f'],stdout=subprocess.PIPE,stdin=StringIO(…

python subprocess stdin
Scanf/Printf double variable C

Let's say I have this following bit of code in C: double var; scanf("%lf", &var); printf("%lf", var); …

c double printf stdout stdin
How to read a line from the console in C?

What is the simplest way to read a full line in a C console program The text entered might have …

c io console stdin
Confused about stdin, stdout and stderr?

I am rather confused with the purpose of these three files. If my understanding is correct, stdin is the file …

linux stdout stdin stderr
How to read from stdin with fgets()?

I've written the following code to read a line from a terminal window, the problem is the code gets stuck …

c stdin fgets
Best practices with STDIN in Ruby?

I want to deal with the command line input in Ruby: > cat input.txt | myprog.rb > myprog.rb &…

ruby stdin
How do I read a string entered by the user in C?

I want to read the name entered by my user using C programmes. For this I wrote: char name[20]; printf("…

c stdin