Questions tagged [stdin]
Standard input (stdin, file descriptor 0) is the input stream to a program.
stdin
3,916
questions
0
votes
0
answers
33
views
asio::stream_descriptor for async read from stdin in raw mode crashes
I want to poll stdin asynchronously for terminal keyboard events, hence the following
/* class tui contains a member 'stdin_' of type 'asio::stream_descriptor',
initialized as such : stdin_{...
0
votes
0
answers
16
views
Send SSH input when output string is detected on windows from python
My company requires a passcode when SSHing to a server:
ssh myserver
Enter a passcode or select one of the following options:
Passcode:
I want call SSH in the background from a GUI so want to detect ...
5
votes
7
answers
247
views
gawk hangs when using a regex for RS combined with reading a continuous stream from stdin
I'm streaming data using netcat and piping the output to gawk. Here is an example byte sequence that gawk will receive:
=AAAA;=BBBB;;CCCC==DDDD;
The data includes nearly any arbitrary characters, but ...
0
votes
1
answer
18
views
undetectable Dart-Input in Visual Code Studio
I made a script in in Visual Studio Code using Dart that grabs the user's input.
The problem is, that if I enter something in the input line in vscode, which is located below the debug console and ...
0
votes
0
answers
50
views
Break the loop if stdin has value
I can not stop the loop if there is not a gap in data send via UART.
If there is gap in data it listens to the command but does not read the UART data anymore.
I would like to
I read data on UART and ...
1
vote
1
answer
42
views
How do I read all keys pressed in nim since the last call to a function, without needing to press enter
I need to read keys from stdin without blocking, and without only recieving them when a newline is pressed. The way i would like it be formatted is a sequence, where each item is a keypress or ascii ...
0
votes
0
answers
35
views
How do I know when a program is waiting for an input and then give the input through Python?
Sorry, this might look very stupid but I have a console C++ program and I need to pass input through Python. It is unexpected when this C++ program waits for an input and so I hoped I could have done ...
-1
votes
1
answer
46
views
Wrapping os.Stdin with an io.TeeReader breaks the tty
Context: I am trying to write a small tool in Golang, which spawns a vim editor and tries to record all the keystrokes input by the user.
package main
import (
"bufio"
"fmt&...
0
votes
0
answers
8
views
Console screen import/export error when using freopen
Can anyone tell me that when using freopen, sometimes when I call new functions using input and output commands on the console screen, it doesn't work? When running, it still works and still processes ...
0
votes
0
answers
22
views
Removing [stdin] keypress listener (or going around) from 3rd party app within plugin/extension (Vitest in this case)
I am writing Vitest reporter, when running tests in watch mode there is an active listener on keypress event on stdin. I want to have my own handling of user interaction, and this one pretty ...
0
votes
0
answers
18
views
Building a menu with inputs from serial port on a Pi Pico
After getting the first input, is not following the normal logic to continue waiting for the input and directly return an error.
1.Checking if there is any data on the stdin with readline() function ...
1
vote
1
answer
61
views
How can I read from neovim's stdin, using rust?
I'm pretty new to rust and I thought I could get some help here.
I'm trying to follow a guide about making LSPs from TJ DeVries, he is coding it in Go but I'm trying to follow along in Rust. I'm stuck ...
0
votes
1
answer
50
views
Bash - Log timestamp of the moment data was received on stdin, coming from a pipe
I have an application that outputs to stdout from time to time - random intervals, random durations of outputting before going silent again. Its output (binary data) is captured into a file.
I want to ...
0
votes
0
answers
58
views
Redirect sendNativeMessage sent to batch file
I am trying a test addon on mozilla that uses sendNativeMessage().
This addon sends a "ping" string to a .bat file.
I am trying to get the input and redirect it to a file.txt.
Sadly, all i ...
0
votes
0
answers
44
views
getline() in C is not receiving input
I am trying to build a simple shell and im having a huge problem with receiving input from the stdin.
For whatever reason when i call getline(), the program gets stuck there and it can't progress.
...