Linked Questions
12 questions linked to/from How to pipe stdout while keeping it on screen ? (and not to a output file)
1 vote
2 answers
6k views
How to display the output of a Linux command on stdout and also pipe it to another command? [duplicate]
Possible Duplicate: How to pipe stdout while keeping it on screen ? (and not to a output file) For example I want to run the command: ls -l Then I have the output to stdout: drwxr-xr-x 2 user ...
2 votes
2 answers
2k views
Print stdout to terminal and use for another command as stdin [duplicate]
I want to make the stdout of a command visible on the terminal but also use it as stdin for another command without many workarounds i.e. creating files in between. This obviously doesn't print the ...
0 votes
1 answer
720 views
Show all of output but only save matching lines of output [duplicate]
I would like to monitor the output of a command and save parts of its output as it prints using a filter. Using grep would be a way to filter the output but I can only get it to show the matches, but ...
0 votes
1 answer
868 views
Kill a process when string read from stdout while still showing stdout [duplicate]
I have a shell script that runs a loop 10 times, on each loop the program does the following: echo "Hello $i times" sleep 1s I would like to have another shell script that reads the stdout ...
401 votes
10 answers
383k views
Build and run Dockerfile with one command
Is it possible to build image from Dockerfile and run it with a single command? There is one command docker build to build a Dockerfile and docker run -it to run the image. Is there any combination ...
0 votes
3 answers
6k views
How to write the output of a bash command to a csv file?
I currently follow memory usage of my machine using the following loop in bash : echo " date time $(free -m | grep total | sed -E 's/^ (.*)/\1/g')" | tee -a log20201113.txt while ...
2 votes
1 answer
2k views
How to pipe output to stdout and into another process in docker
I would like to pipe standard output of a program that is running inside a docker container while keeping the output in the docker logs (i.e. stdout). Another stackoverflow question (How to pipe ...
0 votes
1 answer
1k views
Filter stdout using sed, write filtered output into file but keep unfiltered output on stdout (screen)
I would like to write some filtered output of a given command (rsync) into a file but keep the complete unfiltered output on stdout (the screen/terminal). I've tried some combinations of sed, tee &...
1 vote
3 answers
373 views
How to show command output in stdout and also transfer it to pipe
Lets say I have the fallowing cmd: ls | grep dir If there are folders which names contains dir then ill see them. If there arent, then I wont see any output at all. Now, What i want is to see the ...
0 votes
1 answer
482 views
lp is not working in a bash script
I have a test script that contains the following: lp -d HP ~/cap/alpha/error HP is a designated printer on my wireless network and ~/cap/alpha/error is the full file path to the file containing the ...
0 votes
1 answer
211 views
Display output from last command in bash until loop
until commandThatProducesOutput | grep -m 1 "Done" do ??? sleep 5 done While this script is running, I'd like to pipe the output that commandThatProducesOutput produces to the screen ...
-2 votes
1 answer
88 views
Executing shell script from another shell script & Checking for a particular string from the output of invoked shell script
Let's take example. There are 2 scripts, main.sh invoke.sh I want to execute invoke.sh script from main.sh. When the script invoke.sh executes from main.sh, invoke.sh produces below output on Linux ...