Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Filter by
Sorted by
Tagged with
Filter by Employee ID
Advice
0 votes
6 replies
127 views

My question is similar to How can I pipe stderr, and not stdout? The following captures ALL the output from the cat command in a variable _output="$(cat "$_filename" 2>&1)" ...
3 votes
1 answer
136 views

I am very, very new to programming having just finished a semester-long course on Python. I wanted to take an existing program I had written for my class and redirect all the output text to a separate ...
2 votes
3 answers
185 views

In PowerShell git gc normally produces some info output such as: PS C:\myrepo> git gc Enumerating objects: 12172, done. Counting objects: 100% (12172/12172), done. Delta compression using up to 12 ...
0 votes
1 answer
97 views

I have a fairly complex PyQt application running on Windows that runs with a terminal (python.exe instead of pythonw.exe). It's always been quite handy to be able to see stdout and stderr in real time ...
4 votes
1 answer
158 views

foobar is a Perl script that prints to both standard output and standard error. In a separate Perl script echo-stderr, I run foobar and capture its standard error using IPC::Open3's open3 function, ...
Advice
0 votes
3 replies
92 views

I have a program that writes info in the screen, does some stuff, prints again, and so on. For example, the program is julia MWE.jl, where MWE.jl is the file for ii=1:50 println("ii=",ii)...
0 votes
0 answers
34 views

Consider the following expect script: #!/usr/bin/env expect -f send "Hello world" expect eof send "Goodbye world" I would like the output to be Hello world followed by Goodbye ...
0 votes
0 answers
138 views

I'm running an utility for using kubernetes via the model context protocol. I can call it from the shell like this (using the uv tool utilities): uvx kubernetes-mcp-server --port 8080. I am spawning ...
1 vote
2 answers
170 views

I would want to copy sys.stdout such that it will not be closed. There is some generic code that does: def dosomething(fd: IO[bytes], input): with fd as f: for buf in input: f.write(...
1 vote
1 answer
91 views

I am trying to mock.patch sys.stdout to StringIO as a decorator to record the output for testing. As a 'with' statement it works this way: with mock.patch('sys.stdout', new_callable = StringIO) as ...
0 votes
0 answers
109 views

I'm working with Node.js (ESM .mjs file) on macOS terminal. My printing logic is: Start printing from the current top line in the terminal downward. Continuously add new lines (Hello, world! ) in ...
1 vote
1 answer
151 views

printf doesn't output anything google colab cell: %%writefile my_functions.c #include <stdio.h> #include <stdlib.h> void my_void_func() { printf("my_void_func called from C!\n"); ...
5 votes
3 answers
272 views

I have a module that I need to use. However, when it is imported, it helpfully prints out some status information. > import problematic_module Connected to local cache! Detected version 1.0.0! <...
3 votes
3 answers
932 views

The Python interpreter can be run either in script or interactive/REPL mode. I do have a Python script as text file but want to run it as if it was manually typed in in the interactive/REPL mode. I ...
4 votes
4 answers
171 views

I want to write a bash script that establishes an ssh connection to multiple hosts to execute a command. Because this can be very slow I want to do it in parallel using subshells and log the outputs ...

15 30 50 per page
1
2 3 4 5
322