Questions tagged [stdout]
71 questions
0
votes
1 answer
Redirect output of Python program to /dev/null
I have a Python executable, written and compiled by somebody else, that I simply need to run once halfway down my own bash script. The program uses a text-based UI, therefore waits for input before proceeding, but the key operations it performs when…

tjbp
- 193
- 3
- 6
0
votes
1 answer
Suppress EXT3-fs warning on mount
I am familiar with output suppress on Unix machines, ie:
cat /file/that/doesnt/exist > /dev/null 2>&
However I can't seem to suppress the output of mount when an ext3 filesystem is mounted for the nth time, and it recommends an fsck. As it happens,…

tjbp
- 193
- 3
- 6
0
votes
1 answer
Send STDERR to console and file, STDOUT to file only
I have some script with STDOUT and STDERR output. By default, both STDOUT and STDERR goes to console:
./script.sh
I can redirect STDOUT to file, leaving STDERR output in console:
./script.sh > log.txt
I can redirect both STDOUT + STDERR to same…

AntonioK
- 581
- 2
- 9
- 25
0
votes
0 answers
assign result and status code from wget to variables
Can I get the response and status code and assign them to variables?
# wget https://www.google.com --quiet --server-response 1> >(body=$( >(grep HTTP | awk '{print $2}' | statusCode=$(

Richard Barraclough
- 101
- 6
0
votes
1 answer
How do I get lighttpd access log to stdout?
I am running lighttpd in a docker container on Ubuntu (as a service that must always be up in my traefik setup). My docker-compose.yml contains:
lighttpd:
image: sebp/lighttpd
container_name: lighttpd
restart: unless-stopped
…

gctwnl
- 171
- 11
0
votes
0 answers
How to ensure output from "tee" is shown when used in a script run under systemd
I have a script that I'm running under systemd which has some debug logs that I'd like to send to both stdout (which should end up in the system journal, viewable with journalctl) as well as to a log file on my filesystem.
Typically I'd reach for…

mgalgs
- 345
- 2
- 9
0
votes
1 answer
Linux does STDOUT | STDIN piping write data to disk?
I was planning on passing encryption keys to zfs load-key pool/set through stdin. The keys passed are generated by another program in HEX format and dataset is configured to have keylocation=prompt, keyformat=hex so the key can be passed through…
0
votes
1 answer
Unable to write to `stderr` or `stdout` from Kubernetes pod to pod logs
I'm trying to debug why my application logs aren't being picked up by Promtail for ingestion into Loki.
In order to exclude the complexities of my PHP application logging being the culprit, I'm simply trying to print a message to the stderr stream…

Alex
- 101
- 5
-1
votes
1 answer
stdout and stderr from bash execution to other machine?
Is it possible to send stderr or stdout from a linux machine to ubuntu linux machine using at best wget or other common package at worse ( hopefully not ssh access ) ?
So far i can find a way to "stream" stdout and stderr to other machine.

eugeneK
- 410
- 2
- 8
- 18
-1
votes
1 answer
autostart rc.local 2>&1 redirect, 'open /dev/tty: No such device or address'
I'm trying to execute this command with rc.local:
wget http://address/file -P /root/ 2>&1 | stdbuf -o0 awk '/[.] +[0-9][0-9]?[0-9]?%/ { print substr($0,63,3) }' | whiptail --gauge "Progress" 6 78 0
Above command shows percentage of download some…
-1
votes
3 answers
Redirecting process output to a file per date
I'm currently redirecting all my service's standard output (stdout and stderr) to a single file, by starting is as such:
java blablaargs &> service.out
SVCPID=$!
However, that file grows quite large. Is it possible, without changing the service…

Bart van Heukelom
- 1,199
- 6
- 21
- 41