All Questions
679
questions
0
votes
0
answers
17
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 ...
0
votes
0
answers
11
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 ...
1
vote
1
answer
67
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
51
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
1
answer
42
views
How to properly escape/quote the output so it's treated as an escaped input? [duplicate]
I've been trying to create a set of aliases or functions, that I can use in conjunction with file operating commands.
The idea is to have 1, 2, 3 functions/aliases that will return latest, second-to-...
0
votes
1
answer
74
views
How to write a BASH command in C which use stdin and stdout
I want to write a programme where I compile a C programme, and save it where BASH recognises programmes are (/usr/bin or somewhere).
For usage I want to run in the terminal
$ c_programme <...
0
votes
0
answers
85
views
How to execute process with mmap-ed memory as stdin and another mmap-ed memory as stdout?
It is possible in Linux execute process with mmap-ed memory as stdin and another mmap-ed memory as stdout, so parent program can preallocate memory for stdin, write necessary data, execute program and ...
0
votes
0
answers
37
views
How to launch a program and have a pipe to both stdin and stdout in C on linux [duplicate]
I'm trying to write a C program to configure lemonbar, a status-bar for linux, and i'd like to have the bar be interactive.
The problem is that to write to the bar you have to use the program stdin ...
1
vote
1
answer
114
views
How do I capture stdout and simulate stdin in a Haskell Tasty test?
My impure functions are defined as follows:
module HangmanImpure (HangmanImpure.getLine, HangmanImpure.putStr, HangmanImpure.putStrLn, HangmanImpure.strlen) where
import qualified System.IO as Sys
...
0
votes
0
answers
62
views
Write into stdin, read from stdout Subprocess/Process in Glib/GTK Vala
I have a test bash/sh script. It simply shows a question and reads answer from console, then it shows output:
#!/bin/bash
# Ask the user for their name
echo Hello, who am I talking to?
read varname
...
1
vote
0
answers
60
views
Redirect sys.stdin and sys.stdout [duplicate]
I'm trying to redirect stdin and stdout. My first attempt I tried this code:
from sys import stdin, stdout
stdin = open('in.txt','r')
stdout = open('out.txt','w')
for line in stdin:
print(line)
...
1
vote
2
answers
273
views
Cannot turn off line buffering in C
So, I'm working on a big project, and it requires the stdin and stdout buffers to be disabled so that input and output are processed immediately. However, when I try to do that using setbuf or setvbuf,...
-1
votes
1
answer
97
views
One-way communication in python
For the last day I've been trying to get some one-way continuous communication between two python scripts as an exercise for a bigger project. However, subprocess.communicate only allows a one-time ...
0
votes
1
answer
38
views
Python Popen Subprocess - interacting with executable not possible until stdin is closed
I am trying to interact with a Commandline Executable, but I am stucked.
I would like to print out every line, the .exe is producing to stdout.
Until I get "condition" in a line -> then ...
-3
votes
1
answer
78
views
this code prints nothing on intelliJ idea, it didn't even takes user input or anything
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
// Write your code here.
...