Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [stdout]

The tag has no usage guidance.

0
votes
1answer
106 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-...
0
votes
1answer
73 views

Azure Site (Windows) ASP.NET Core 2.2 stdout logging not working and 502.5

I have an ASP.NET Core 2.2 site deployed to an Azure Site (App Service? Web Site?) running Windows (10, powershell says). I've installed the ASP.NET Core 2.2 service extension that contains the ancmv2 ...
1
vote
0answers
70 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
128 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
68 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
947 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
241 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
209 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
149 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
604 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
155 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
74 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
399 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
22 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
1k 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 ...
0
votes
1answer
273 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
2k 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
477 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
629 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
1k 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
2k 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. ./...
2
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
48 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
137 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
716 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 &...
6
votes
4answers
772 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
718 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 ...
7
votes
3answers
4k 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
2k 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
196 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
745 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
623 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
291 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
655 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 ...
8
votes
2answers
20k 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 ...
49
votes
8answers
52k 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
891 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
197 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 ...
2
votes
5answers
2k views

Is there a simple command-line HTTP proxy that outputs to STDOUT?

Is there a command-line HTTP proxy that outputs to STDOUT so I can use it with Unix pipes? I want to do something like this: Start the proxy at the command-line: $ proxy -p 8888 | grep "Text I'm ...
1
vote
3answers
3k views

Redirect cronjob STDOUT and STDERR to /dev/null not working

I'm baffled as to why this isn't working. I've tried redirecting STDOUT and STDERR using "&>" and also "2>&1" and neither seems to work. I still get e-mailed by this cron job (every minute!) ...
2
votes
1answer
716 views

CentOS 5.3, Perl, bash commands, Hide ALL output to screen

I am running the following command: [user@server ~]$ /usr/sbin/ntpdate -d IPREMOVEDFORSECURITY | egrep 'transmit timestamp' | tail -1 | awk '{print $4, $5, $6, $7, $8}' host found : ...
7
votes
3answers
7k views

How can I redirect an already running process's stdout/stderr?

(Running on an Ubuntu 10.04 64-bit server) Yesterday, I made the mistake of starting a process (which I didn't realize was going to take several days to run) over SSH without using screen. I've ...
1
vote
1answer
277 views

Windows XP, pipe StdOut to Commandline

As an example, I would like the following commands to put a dir listing with all subdirectories to StdOut copy con test /s^Z dir `test` So, after lines one and two, there's a file in the current ...