Questions tagged [stdout]

71 questions
1
vote
1 answer

stdout does not display `rpm -qa` output without redirect

On a SLES 12 virtual machine the command rpm -qa does not return anything to stdout. ~> rpm -qa ~> The command finishes after 1 or 2 seconds, so it clearly generates some data. Only when the output is redirected to a file or through a pipe it…
TheCooocy
  • 141
  • 6
0
votes
2 answers

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 dst net (10 or 172.16/12 or 192.168/16))' -t -L1 2>…
0
votes
1 answer

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-ga9ed1993+ Copyright(C) 2001-2019 Alexandre Cassen,…
0
votes
1 answer

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'; tail /var/log/nginx/access.log; printf '\n\n…
Arcticooling
  • 1
  • 3
  • 7
  • 22
0
votes
1 answer

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 /dev/stdout. Error message Whenever the warning…
0
votes
4 answers

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 w3svcsadm echo "TEST ran" >…
0
votes
2 answers

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 by mail. If the backup got an error from any…
Loenix
  • 101
  • 1
  • 2
0
votes
1 answer

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 advice me [root@161 tmp]# bash --version GNU…
jython.li
  • 84
  • 2
  • 10
0
votes
2 answers

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 + & disposing stdout and stderr to /dev/null. But when…
Sdlion
  • 101
  • 2
0
votes
1 answer

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 messages be written to the filesystem. Is it possible…
svoop
  • 145
  • 1
  • 6
0
votes
2 answers

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.
Naveen Vijay
  • 390
  • 6
  • 18
0
votes
1 answer

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 though. To give you an example : root@myserver:/#…
0
votes
1 answer

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 > err3.txt 1 > std3.txt When it crashes I get…
Max
  • 133
  • 1
  • 7
0
votes
1 answer

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 wants a PHP website and it is supposed to run on…
BlaM
  • 3,886
  • 5
  • 27
  • 28
0
votes
2 answers

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 ) ~> echo "test" | wc -l 1 but I need to…
Barooh
  • 3
  • 1