Standard error is another output stream typically used by programs to output error messages or diagnostics.
8
votes
1answer
116 views
Output of command not in stderr nor stdout
I've stumbled on this issue, so I'm wondering how is this possible?
Standard run of command:
# zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14
info from server: "Processed 0 Failed 1 ...
2
votes
2answers
44 views
redirecting std output and std error
I have been trying to figure out the relationship between file descriptors. One thing I don't understand is, how is:
ls -l /bin/usr > ls-output.txt 2>&1
different from:
ls -l /bin/usr ...
3
votes
2answers
106 views
Copy stdout and stderr to a log file and leave them on the console within the script itself
Using bash, how do I copy stderr and stdout to a log file and also leave them displayed on the console?
I would like to do this within the script itself using an exec.
I tried with
exec ...
2
votes
1answer
52 views
Why is it possible to refer to a closed stderr under bash?
I'd like to know why bash doesn't display an error message when we refer to a closed stderr. When it comes to other file descriptors, they have to be opened if we want to, for example, duplicate them. ...
2
votes
1answer
73 views
Stderr of piped shell scripts isn't always displayed
I piped my own shell scripts for some testing and accidentally noticed something strange. Namely, the stderr of those piped processes isn't always displayed on the screen.
I simplified the scripts ...
7
votes
2answers
491 views
Does `Segmentation fault` message come under STDERR?
I ran an executable in bash
./code > log
It shows occasional error messages on terminal whereas all printf statements go into log file. I re-run it like below
./code >& log
Now, the ...
2
votes
2answers
356 views
How to redirect error to a file?
I have this simple script which redirects the output and append it to a file.
filename="/home/ronnie/tmp/hello"
date=$(date)
echo "$date" >> $filename
Now, lets suppose I change date=$(date) ...
4
votes
2answers
135 views
Redirect stderr of the double-parentheses construct
I'd like to be able to redirect the stderr of a double-parentheses construct.
For example:
a=$(($var/$var2))
would output some error messages if $var2 = 0, I do not want the user to see this.
I ...
3
votes
1answer
120 views
Why doesn't “cvs --help | less” work?
I don't know why, but piping cvs --help to less doesn't work. Probably it's because cvs --help outputs not to standard output(1) or error output(2), but somewhere else. Could you tell me where does it ...