Piping command output to tee but also save exit code of command [duplicate]
This question already has answers here: Pipe output and capture exit status in Bash (15 answers) Closed 8 years ago. I have a … Read more
This question already has answers here: Pipe output and capture exit status in Bash (15 answers) Closed 8 years ago. I have a … Read more
It works ok as a single tool: curl “someURL” curl -o – “someURL” but it doesn’t work in a pipeline: curl “someURL” | … Read more
I can’t seem to get jq to behave “normally” in a shell pipeline. For example: $ curl -s https://api.github.com/users/octocat/repos | jq | cat … Read more
I am trying to get bash to process data from stdin that gets piped into, but no luck. What I mean is none … Read more
I am doing a find and then getting a list of files. How do I pipe it to another utility like cat (so … Read more
I would like to pipe standard output of a program while keeping it on screen. With a simple example (echo use here is … Read more
How do I detect from within a shell script if its standard output is being sent to a terminal or if it’s piped … Read more
This question already has answers here: Store output of subprocess.Popen call in a string [duplicate] (15 answers) Closed 3 years ago. How can … Read more
I want to use subprocess.check_output() with ps -A | grep ‘process_name’. I tried various solutions but so far nothing worked. Can someone guide … Read more
I want to execute a long running command in Bash, and both capture its exit status, and tee its output. So I do … Read more