I'm using Lua in a cmd window under Windows. I use "cat" (from UnxUtils) to feed a file to a Lua script. The script uses "io.read(1)" to read one byte ...
I'm using Lua in a cmd window under Windows. I use "cat" (from UnxUtils) to feed a file to a Lua script. The script uses "io.read(1)" to read one byte ...
I am trying to write a native PHP CLI application which reads data (log data) from stdin and does some handling after. I got a first working version ...
I have a program that uses the Python fileinput module, and I am trying to write unittests for the main() function. They work find when using an actua ...
I'm trying to resolve an exercise in python. It has an platform with some pre-code part and I have to enter some code to complete. But usually, I like ...
I'm writing a program that should work like the following unix command: seq 2 number | awk argument | grep argument When I run the following code w ...
I need to parse stdin in the following way: (1) all newlines characters must be substituted with \n (a literal \ followed by n) (2) nothing else sho ...
I need a utility that read from stdin, split as lines write to stdout json object, {"cmd": "In", "lines": [lines from stdin]} I heard jq bein ...
What program shoud do? Read two numbers separated by space from terminal e.g. "10 8". Split the string to Vec<&str>. Parse Vec[0] an ...
(Adapted from this: Join Manual, Header lines). I am sorting a file called file1 with this content: If I just write: sort -k2b,2 file1 I get: ...
How can I replace the values of parameters step by step. What I mean is, For Example- Url is https://example.com/?p=first&q=second&r=third ...
So the following program doesn't know how many files will receive that's why I used a vector of pointers to store the pointers to all files. Anyway, t ...
UPDATE Thanks a lot for the answers and comments. Thanks to @Fravadona for the help I managed to copy it and change a few things. This is the actual ...
I want to directly push a character array into the standard input stream stdin, but cannot think of a syntax that works. The closest I can think of is ...
I am trying to write a function in C that checks the presence of stdin using poll() Here fds.fd=0 refers to file descriptor for STDIN. fds.events = ...
I have function for getting user input using os.Stdin func (i input) GetInput(stdin io.Reader) (string, error) { reader := bufio.NewReader(stdin) ...
I was writing a PowerShell script, and forgot to quote $input when piping to a command. The command unexpectedly appeared to receive the string Curren ...
I want to read user input from inside a bash script test.sh: #!/bin/bash read -p "Do you want to continue? (y/n) " yn case $yn in [yY] ) echo " ...
So I'm simply trying to accept input from the user in the form 1 2,or 0 0, 2 2, 0 1, etc. If the user enters this the first time around then everythin ...
The point of this program is to ensure valid input of two integers between 0 to 2 with a space in between (and strictly nothing else), and then to ass ...
My professor write a C code about fgets,feof with using stdin. But I don't understand how it works. when i write a 'hello', function while is worki ...