12 Matching Annotations
- Jul 2021
- Apr 2021
-
unix.stackexchange.com unix.stackexchange.com
-
Write stderr and stdout to a file, display stderr on screen (on stdout) exec 2> >(tee -a -i "$HOME/somefile.log") exec >> "$HOME/somefile.log" Useful for crons, so you can receive errors (and only errors) by mail
-
-
stackoverflow.com stackoverflow.com
-
What you want is not to detect if stdin is a pipe, but if stdin/stdout is a terminal.
The OP wasn't wrong in exactly the way this comment implies: he didn't just ask how to detect whether stdin is a pipe. The OP actaully asked how to detect whether it is a terminal or a pipe. The only mistake he made, then, was in assuming those were the only two possible alternatives, when in fact there is (apparently) a 3rd one: that stdin is redirected from a file (not sure why the OS would need to treat that any differently from a pipe/stream but apparently it does).
This omission is answered/corrected more clearly here:
stdin can be a pipe or redirected from a file. Better to check if it is interactive than to check if it is not.
-
-
unix.stackexchange.com unix.stackexchange.com
-
This question does not show any research effort; it is unclear or not useful Bookmark this question. Show activity on this post. I'm trying to filter the output of the mpv media player, removing a particular line, but when I do so I am unable to control mpv with the keyboard. Here is the command: mpv FILE | grep -v 'Error while decoding frame' When I run the command, everything displays correctly, but I am unable to use the LEFT and RIGHT keys to scan through the file, or do anything else with the keyboard. How do I filter the output of the program while retaining control of it?
-
Quite a lot of programs actually detect if their output goes to a file (e.g. try man | grep -F a and you will not be able to scroll back and forth).
-
-
samba.2283325.n4.nabble.com samba.2283325.n4.nabble.com
-
i found that for the osx host "gonzo" , the vanished files (not the warning message itself) appear in stdout - for linux hosts they _both_ appear in stderr , but nothing in stdout (rsync.err.#num is stderr, rsync.log is stdout)
-
- Nov 2020
-
github.com github.com
-
logInfoToStdOut (boolean) (default=false) This is important if you read from stdout or stderr and for proper error handling. The default value ensures that you can read from stdout e.g. via pipes or you use webpack -j to generate json output.
-
- Jun 2020
- May 2020
-
github.com github.com
-
Once running, kaniko will then get the data from STDIN and create the build context as a compressed tar. It will then unpack the compressed tar of the build context before starting the image build.
-
-
thoughtbot.com thoughtbot.com
-
Pipes are great for taking output of one command and transforming it using other commands like jq. They’re a key part of the Unix philosophy of “small sharp tools”: since commands can be chained together with pipes, each command only needs to do one thing and then hand it off to another command.
-
-
en.wikipedia.org en.wikipedia.org
-
www.catb.org www.catb.org
-
Write programs to handle text streams, because that is a universal interface.
-