Questions tagged [stdout]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
26 views

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, ...
0
votes
1answer
81 views

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 ...
0
votes
0answers
11 views

Hhow to make it authoritatively change position in the "stdout_lines [] to run a task

my name is Esteban and I would like you to help me solve this problem in Ansible. It turns out that I want to know how I can make my program change position automatically so that it executes a task. ...
4
votes
1answer
5k views

Ansible display realtime shell stdout

I want see the realtime shell stdout, instead of registering in a variable and then display once it is completed. Example Playbook - test.yml - name: Testing RUN Shell Command hosts: localhost ...
0
votes
2answers
84 views

Can't redirect awk output to a file… tried everything

I created a nice little command to measure data bandwidth consumption over a metered connection (excluding local traffic): sudo iftop -i enp1s0 -f 'not (src net (10 or 172.16/12 or 192.168/16) and ...
0
votes
1answer
29 views

Redirect rpccclient output

This is such a simple task I must be overlooking something. I am using rpcclient to dump some data and I cannot seem to figure out how to redirect the output to a file. The standard > doesn't ...
0
votes
1answer
145 views

Bash command stdout

I'm trying to get a software version by using the bash script. The Command is simple: /usr/local/sbin/keepalived -v This is the output: Keepalived v2.0.13 (02/18,2019), git commit v2.0.12-53-...
4
votes
1answer
3k views

SSHd logs in Docker container not shown by `docker logs`

When using CMD ["/usr/sbin/sshd", "-D"] in a Dockerfile, docker logs does not show the logging: cat > Dockerfile.stdout <<EOF FROM alpine:latest RUN apk add --no-cache openssh-server \ ...
0
votes
1answer
298 views

Short syntax to display all Nginx logs at once aesthetically, in stdout

This is how I display all Nginx logs at once aesthetically (with headings and spacing), in stdout, for comfortable debugging. Input: printf '\n\n General: \n\n'; nginx -t; printf '\n\n Access: \n\n';...
-1
votes
1answer
86 views

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 "...
1
vote
1answer
2k views

Debugging rsync over SSH in verbose mode using tee to redirect stdout to log file

I have been having issues with various rsync operations over SSH, on a particular machine on our network, failing and giving errors like: rsync: connection unexpectedly closed (45482 bytes received ...
0
votes
1answer
520 views

Dovecot quota-warning executable can not log to stdout

I'm running dovecot with DB based userdb and passdb inside a docker container using the s6-overlay. Everything runs very well. Now I tried to add quota warnings and run into a problem with logging to ...
0
votes
0answers
2k views

Tomcat has stopped generating stdout logs

We have tomcat server in our production environment. Suddenly tomcat has stopped generating stdout logs. Last generated log by tomcat is one month ago and the size of stdout log file is 5006 KB. What ...
0
votes
4answers
304 views

Sudo redirected stdout file ownership

I am redirecting stdout from a sudo. However, the file ownership of the output file is the user who ran sudo, not the sudo target user. I'm logged in as 'root' for the command below: sudo -u ...
0
votes
2answers
660 views

Capture outputs with bash to log it and alert user

I am modifying a backup script to save multiple servers with multiple services and different configurations using bash on an Ubuntu server. I save outputs from commands into a log file and sent these ...
3
votes
3answers
826 views

Grep regex Stdout to telnet

I'm trying to use grep to get a regex result and pipe the results on-the-fly to telnet running an open port to a node server. The grep received continuous, but varied in interval, commands from a ...
0
votes
1answer
375 views

When use “exec 1>ok.log”, how can I output the specified content to the screen within a shell script?

As follow, I only want the command echo "this is to stdout" output to my screen instead of to the file ok.log, how can I do? I search for the usage of exec shell command, but without result, please ...
1
vote
1answer
83 views

How do I pipe stdout and std error to a file and back to stdout on Windows?

On Windows when running a batch script I want to record the output of I run: myprogram.bat 1> mylog.log 2>&1 Which is great - but I have to run a separate tail process to read the output ...
0
votes
2answers
431 views

Streaming stdout

I have a script that outputs a lot of debug data that I would like to avoid to save on disk (specially since the file system is on a flash memory card). So I run it on the background with nohup + &...
0
votes
1answer
23 views

Make init script output available without hitting the filesystem

I'm working on an init script for a command which writes extensive activity messages to stdout. The output is only useful for debugging and since it will be running on a Pi, I don't want these ...
1
vote
1answer
2k views

Ansible loops and conditions with arrays

I want to be able to control the behaviour of a module by specifying a changed_when condition. This works fine when executing a simple task like the one in the docs: - command: some command ...
1
vote
1answer
398 views

How to append unix timestamp to each line output file

I'm running the following command and storing the stdout into a text file. I need to add unix timestamp to each line output file to figure out start and end time of each operation. $ ./bin/ycsb load ...
0
votes
2answers
3k views

ansible tower reports : stdout capture is missing

How to fix the error of stdout capture being missing. I am scheduling couple of tasks, initially they are running fine after couple of iteration it is throwing this error.
-1
votes
1answer
656 views

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 ...
2
votes
2answers
657 views

Unable to channel docker-registry stdout to log file

I've been trying (rather futilely) this afternoon to try and stop docker-registry from writing to stdout but rather a log but I think the underlying Python is creating processes which seem to bypass ...
1
vote
0answers
79 views

Losing stdout when process restarts itself in windows

I have for example a NodeJS process running with Nodemon, and all the output redirected to a file. nodemon example.app > 123.log When I change any file in the node app, the NodeJS process is ...
4
votes
1answer
2k views

BASH: alternatives to coproc [closed]

I have some scripts which use coproc to control stdout/stdin of subprocesses. Unfortunately, coproc was introduced in Bash 4.0, and on many systems I use, there is an earlier versions of bash. Are ...
2
votes
2answers
3k views

Log rotate log from standard out

I have a program which takes an argument to allow extra debug from a piece of hardware we use. The log is just written to standard out so normally we just pipe the standard out to a file i.e. ./...
3
votes
2answers
2k views

logging/capturing STDERR/STDOUT on Amazon EC2

I'm looking for a solution that would allow me to automatically capture the STDOUT/STDERR of a process running on Amazon EC2, and send it (remotely) to another server. Sound simple, except: I will ...
0
votes
1answer
51 views

How to prevent printing of “debug path” in stdout?

Sys Vers: ubuntu precise 12.04 LTS I seem to have a config setting that forces an executable to log to stdout (or stderr) the current directory it walks through. All commands execute successfully ...
-1
votes
3answers
141 views

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 ...
1
vote
0answers
830 views

Display only the last line of a windows command line executable

I'm trying to write a batch script that manages simple software deployments. One of the steps in the script compresses a file structure into a 7zip archive. During the compression process, the z7ip ...
0
votes
1answer
1k views

Can't redirect STDERR or STDOUT to file

I have application written in Go language and it runs in screen (I do not think problem relates to Go language. I believe it uses STDOUT and STDERR) screen -S log_server -d -m go run log_server.go 2 &...
7
votes
4answers
862 views

Should a foreground program invoked by a daemon split logging between stderr and stdout based on severity levels?

Usually log messages are written to stderr. I'm wondering if it is a good idea/practice to split log messages so that errors and warnings go to stderr while debug/informational/notice messages go to ...
0
votes
1answer
803 views

IIS7 and PHP: Show error messages with all the rest of the output

Okay, this is slowly getting annoying. I'm used to work with Apache Webservers and never had any of these problems. IIS seems to try to be intelligent - or whatever. Here's my situation: My customer ...
8
votes
4answers
6k views

Is there anyway to get msiexec to echo to stdout instead of logging to a file

As part of a continuous delivery pipeline I'd like to install an msi on a given machine. msiexec plus psexec does this perfectly, but it seems that msiexec can only log to a file and I need it to log ...
2
votes
2answers
3k views

Windows cmd stderr redirection to stdout while keeping output to stderr?

Is there a way in Windows 7 cmd shell to redirect the stderr to stdout while keeping the stderr stream intact? For example, I have a program that outputs to stderr and stdout the following message ...
0
votes
2answers
266 views

How to output a stdout both to a process and the shell screen

Do someone knows a way to send the stdout of a command both to another command and display it in the shell screen? Note: without using files. An example (in this case I use wc -l to make it simple ) ...
1
vote
2answers
791 views

Unix wrapper to make any binary accept stdin/stdout redirection

This is a common situation: you want to include command 'foo' as part of a pipeline, but unfortunately command 'foo' only accepts actual filenames for I/O and does not read/write from stdin/stdout. I ...
3
votes
1answer
2k views

Forcing command on ssh's authorized_keys merges STDOUT and STDERR

I've been working to have a script in a centralized server to do some things and output a .tar.gz file (see redirect temporarily STDOUT to another file descriptor, but still to screen). I also have ...
2
votes
3answers
3k views

redirect temporarily STDOUT to another file descriptor, but still to screen

I'm making a script that executes some commands inside, and these commands show some output on STDOUT (and STDERR as well, but that's no problem). I need that my script generates a .tar.gz file to ...
2
votes
2answers
2k views

Prefix standard output before piping to a command

On Linux (Debian), how can I prefix the standard output of a command with one or several lines before piping it to a second command? This is for mailing the output of a command using sendmail like so:...
4
votes
2answers
656 views

From log file into terminal in realtime

I'm on Ubuntu. Is it possible to open putty and watch as a log file updates right in terminal? Like if stdout would have been directed in terminal? For example I have one application's stdout and ...
1
vote
1answer
2k views

suppress output of hping in Linux

I wish to suppress all output to stdout (console) from hping3 from a bash script, but everything I try results in the statistics still being displayed, even tho the individual ping results are ...
2
votes
1answer
431 views

Append stdout to file, but continue to output to console

On linux/bash I'd like to append stdout of a command to a file, but not redirect it (i.e. I want it to to go to both console and file). Any clues?
1
vote
1answer
681 views

stdout, stderr, and what else? (going insane parsing slapadd output)

I am using slapadd to restore a backup. That backup contains 45k entries which takes a while to restore so I need to get some progress update from slapadd. Luckily for me there is the -v switch which ...
9
votes
2answers
28k views

Completely silent robocopy

I'm trying to robocopy some files silently. Right now, I have robocopy putting everything into a log file, which is fine, but after it finished, Log File: C:\<logfiledestination> is printed. My ...
53
votes
8answers
62k views

Is there a way to redirect output to a file without buffering on unix/linux?

I have a long running batch process that outputs some debug and process information to stdout. If I just run from a terminal I can keep track of 'where it is' but then the data gets too much and ...
3
votes
2answers
1k views

Linux Pipe, Warning Messages, stdout

This is probably the best place to ask the question in its simplest form. I am writing a script which takes output of a command and puts it into a variable. After some debugging I figured out the ...
1
vote
4answers
212 views

Command to execute another command while replaying the command on STDOUT

It's not easy to formulate the question properly, maybe it helps when I describe what I'd like to do. I want to execute a command and pipe it's output into a tool called pastebinit which uploads the ...