Skip to main content

Questions tagged [tee]

tee is a command line utility that reads the standard input and writes to the standard output as well as a file specified as an argument. Use this tag for questions about the tee command.

0 votes
2 answers
466 views

I'm trying to capture all of the terminal output during an in-place upgrade of my Debian system. Here's the command I've tried to use: $ sudo apt full-upgrade -y -o Dpkg::Options::="--force-...
Seamus's user avatar
  • 3,928
15 votes
2 answers
2k views

I'm in Linux and in Bash. I expect seq 1000000 | tee /dev/stdout to always output 9 numbers from 1 to 9 and their duplicates (18 in total). But when I do seq 1000000 | tee /dev/stdout | grep -c '^[1-...
decision-making-mike's user avatar
0 votes
0 answers
35 views

I wanted to use tee /dev/tty to look into the stream passing through a pipeline. While making some tests, I observed the following: ~$ cd /proc/self/fd /proc/self/fd$ ls 0 1 2 255 # Ok /proc/self/...
The Quark's user avatar
  • 454
5 votes
2 answers
363 views

mkfifo foo printf %s\\n bar | tee foo & tr -s '[:lower:]' '[:upper:]' <foo wait rm foo This is a working POSIX shell script of what I want to do: printf %s\\n bar is symbolic for an external ...
finefoot's user avatar
  • 3,586
2 votes
2 answers
532 views

for the following command output=$(cat $file | docker exec -i CONTAINER COMMAND 2>&1 | tee /dev/stderr) what is the meaning and usage of 2>&1 | tee /dev/stderr? I google and 2>&...
user1169587's user avatar
1 vote
1 answer
264 views

I have script script.sh: #!/usr/bin/env bash # pm2 seems to always run in `bash` regardless of `#!` echo "running in $(readlink -f /proc/$$/exe)" # Redirect to both stdout(1) and stderr(2) ...
Amith's user avatar
  • 323
0 votes
1 answer
129 views

Having a bash script that essential only doing: mbuffer --md5 -i dummy.tar -o /dev/null A user of this script wants to use tee and store the output messages in a log file. ./script.sh 2>&1 | ...
TopCatSE's user avatar
0 votes
1 answer
190 views

I know how to use tee, of course, I have used it many times. However, it is normally something like: du -h /some/directory | sort -h | tee census While this works fine, it means I don't see anything ...
j4nd3r53n's user avatar
  • 789
0 votes
1 answer
246 views

At the moment, I have this in a wrapper script: 2>&1 ./update.sh | ts | tee -a ./update.log and this in update.sh: if apt full-upgrade -y | grep linux-headers then echo echo Need to ...
AaronD's user avatar
  • 153
8 votes
1 answer
1k views

This is a plaintext file, apparently limited to 300 lines. I use tee frequently on my system. $ file .tee_history .tee_history: Unicode text, UTF-8 text $ wc -l .tee_history 300 .tee_history $ tee --...
user598527's user avatar
2 votes
1 answer
178 views

I captured the output of a script that uses tput to draw certain things on screen. When I perform cat myoutput then everything is well seen (looks like terminal reinterprets it from beginning), but ...
Whimusical's user avatar
0 votes
1 answer
194 views

I'm running a script (in a Laravel project) that takes a few hours to complete. nohup to prevent it from exiting if my ssh session is disconnected. nohup php artisan do:thing 2>&1 | tee ~/tmp ...
Jeremy Belolo's user avatar
-1 votes
1 answer
106 views

I saw a socat example here, where they use tee l2r | socat - "TCP:remote:5555" | tee r2l what does the l2r or r2l mean?
René Link's user avatar
0 votes
1 answer
115 views

The macos pbcopy utility grabs its input stream and stores it in the system clipboard, without displaying anything. So, when I want to copy/paste the output of a command in the terminal, I typically ...
JL Peyret's user avatar
  • 115
19 votes
3 answers
16k views

I am trying to interpret the following tee command: cat colors.txt words.txt | tee colorsAndWords.txt | wc Is my understanding, as follows, correct? cat colors.txt words.txt: This command ...
Nosail's user avatar
  • 291

15 30 50 per page
1
2 3 4 5
16