Linked Questions

1 vote
2 answers
6k views

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 ...
Lacek's user avatar
  • 1,625
2 votes
2 answers
2k views

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 ...
mstruebing's user avatar
  • 1,822
0 votes
1 answer
720 views

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 ...
MrU's user avatar
  • 128
0 votes
1 answer
868 views

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 ...
robbliebob's user avatar
401 votes
10 answers
383k views

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 ...
Twinkle's user avatar
  • 4,121
0 votes
3 answers
6k views

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 ...
Lucas Morin's user avatar
2 votes
1 answer
2k views

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 ...
Oenotria's user avatar
  • 1,712
0 votes
1 answer
1k views

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 &...
suamikim's user avatar
  • 5,389
1 vote
3 answers
373 views

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 ...
MichaelR's user avatar
  • 1,019
0 votes
1 answer
482 views

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 ...
Python Jim's user avatar
0 votes
1 answer
211 views

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 ...
cactusphone's user avatar
-2 votes
1 answer
88 views

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 ...
Yunus's user avatar
  • 3