The tag has no usage guidance.

learn more… | top users | synonyms

2
votes
2answers
60 views

STDOUT and STDERR redirection for nc

I am trying to make a watchdog bash script which has to check if the port is open, based on the exit status, otherwise should start the daemon. Problem is I can't manage to avoid the script outputting ...
-1
votes
1answer
32 views

Some programs print errors to stdout instead of stderr, and don't set $? when an error occurs. Why? [closed]

See title. I've seen this twice recently, with both udisks and pacmd, and they are 100 times harder to script because of it. Why do programmers do this? For example, I want to switch the audio output ...
0
votes
1answer
25 views

Why is stdin/stdout failing with gplay on ubuntu?

I am trying to change gplay's volume level programmatically in a Java app. The video plays fine; I see gplay's menu; I get my first "Playing" prompt, and I write a "v" for "[v]Volume" but I never see ...
3
votes
1answer
48 views

stderr of terminal in red, even with sudo

I am trying to make a working example for logrotate, and to help me through this I figured it was a good idea to turn stderr to red. Through some reading, I came upon stderred, which I meant to adopt....
0
votes
1answer
50 views

run a command, send output to mail with stderror colored

I have a script that writes to the STDOUT and STDERR. I can pipe the script to mail so it sends me an email of the output. What I want to do now is have the STDERR of the output colored such that the ...
0
votes
1answer
24 views

Why does man -P behave differently when the output is redirected or piped?

man -P whoami ls This command will output user's name, just like whoami. But when you use pipe to redirect it to a file or to your screen like man -P whoami ls | cat or man -P whoami ls > file, ...
1
vote
0answers
97 views

run a process in background and give stdout for it even if terminal is closed

I found some link here(Hide stdout of a process only when it is running in background) about redirecting running process' output but my case(a module logging to stdout) is a bit different. Cause I am ...
5
votes
2answers
1k views

systemd on 15.04 won't log stdout of unit

I'm currently trying to make a systemd unit as a web server. Currently, my foo.service file looks as follows: [Unit] Description=The Foo Web Server [Service] Type=simple ExecStart=/opt/foo/.cabal-...
1
vote
2answers
540 views

How to copy the stdout of a command to the clipboard in a default Ubuntu installation?

I ran up against this question, and i found it quite interesting. While researching for that, i found out that a solution had been posted already here on AskUbuntu, plus multiple times on ...
0
votes
1answer
69 views

Upstart and isstty(STDOUT_FILENO)

Many Linux programs use istty to determine whether STDOUT is a terminal or not. For example, ls will (by default) suppress coloured output if it's redirected (istty == 0). When running upstart jobs, ...
0
votes
1answer
45 views

Could someone explain what the following command does?

Could someone explain me what the following command does? find / > allfiles.txt 2>/dev/null
0
votes
1answer
107 views

untar content of folder from tar.gz archive that get's data from STDOUT (wget)

I want to extract the content of a single folder from a tar.gz archive that get's it's input from the STDOUT of wget. My command looks like this: wget -O - http://example.com/file.tar.gz | tar -C /...
1
vote
2answers
1k views

printf, redirection, crontab

I'm having trouble redirecting C printf statements to a file with a program running as root. I have a program with several informational printf statements and other libraries which print errors via ...
0
votes
1answer
367 views

When piping output to a file, why are stderr and stdout in the wrong order?

I have a perl script: warn "1\n"; print "2\n"; warn "3\n"; print "4\n"; I pipe the output to a file: perl script.pl &> foo cat foo: 1 3 2 4 Why isn't the output in order, and how do I ...
44
votes
4answers
107k views

What does 2>/dev/null mean…?

I want one or two line description about the following command line: grep -i 'abc' content 2>/dev/null
0
votes
1answer
894 views

“Bad file descriptor” with /dev/stdin using dd

I've been using this method (Running off a live CD on both ends, and in root shell, as suggested in another of my questions) to clone one computer I've got set up to my liking to four others with the ...
1
vote
2answers
151 views

Redirect stdout and stderr so that it is displayed or stored nowhere

I want a process to just NOT print its stdout or stderr output. I know that I can do something like program >output.txt 2>errors.txt and then rm output.txt errors.txt but its not elegant. I want ...
2
votes
1answer
211 views

How to make everything on stdout be read aloud (using espeak)?

I've got the eSpeak TTS system up and running, and I like it quite a bit. I'm wondering, is there a way to pipe EVERYTHING that gets printed to STDOUT to espeak? I'm trying to set up a system without ...
7
votes
2answers
14k views

How can I view stdout/stderr of a startup application?

Some of the commands that I have in Startup Applications do not start properly when I login. (In particular I am having trouble with gtk-redshift.) In order to debug, I would like to be able to view ...
1
vote
1answer
796 views

Directly compress stdout

can someone tell me if is possible to directly compress stdout? I would like to do this in one step without creating temporary file files.txt... Example: cat file* > files.txt tar -czf files.tar ...