Send string to stdin
Is there a way to effectively do this in bash: /my/bash/script < echo ‘This string will be sent to stdin.’ I’m aware that … Read more
Is there a way to effectively do this in bash: /my/bash/script < echo ‘This string will be sent to stdin.’ I’m aware that … Read more
I’m looking to process a text file with node using a command line call like: node app.js < input.txt Each line of the … Read more
I am rather confused with the purpose of these three files. If my understanding is correct, stdin is the file in which a … Read more
The following Perl script (my.pl) can read from either the file in the command line arguments or from standard input (STDIN): while (<>) … Read more
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be … Read more
If I do the following: import subprocess from cStringIO import StringIO subprocess.Popen([‘grep’,’f’],stdout=subprocess.PIPE,stdin=StringIO(‘one\ntwo\nthree\nfour\nfive\nsix\n’)).communicate()[0] I get: Traceback (most recent call last): File “<stdin>”, line 1, … Read more
I’m trying to do some of the code golf challenges, but they all require the input to be taken from stdin. How do … Read more