Questions tagged [tee]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
0answers
15 views

ffmpeg tee mux option for restreaming a single input to multiple destinations without transcoding using Copy

Wanted to stream or "restream"" to multiple outputs using the tee mux but it appears that the copy flags don't seem to work. Wanted to try something like this: ffmpeg -re -i /home/video/test.mp4 -...
0
votes
0answers
37 views

Redirect stdout to two commands

I want to unzip several large compressed CSV files (~50Gb each), split each one to smaller chunks and then print the header of each file to stdout/terminal while avoiding reading the large file more ...
0
votes
1answer
181 views

Ffmpeg Tee muxer not displaying video stream

I'm trying to send an rtmp stream to wowza with the tee muxer. Then I'm reading the stream from wowza in HLS. When running this command it works: ffmpeg -re -i myVideo.mp4 -c copy -f flv 'rtmp://...
0
votes
1answer
22 views

How to pass a pipe command to terminal -e?

I want to create a shortcut which shows in a new terminal the output of my command and simultaneously writes it into a log file. I use terminal -e (or urxvt -e) to run the follwing command: terminal -...
0
votes
1answer
437 views

How to suppress output from tee based on variable in Bash

So, in the following example: echo "text to write to file but also not send to stdout" | tee -a $logfile 1> /dev/null The output does not get printed on the terminal. But when I try doing the ...
1
vote
2answers
55 views

tee command, show both stdout outputs

I would like to show the content of a file and also the calculated cksum of the file at once, why does the following command only output the file - but not the cksum? sudo cat filename | tee cksum I ...
2
votes
1answer
3k views

Pipe output of command line by line in Windows

I'm running a server from a batch file and I want the server output to be displayed both on the screen and also written to a log file. I found a way to do this from this answer: powershell "...
2
votes
1answer
597 views

Pipe stderr to file and screen without redirecting stderr to stdout

In a bash script I'd like to execute a command while piping the stderr to both a file and to the terminal. However, I want stderr to stay on the '2' file descriptor so that I can parse it from an ...
92
votes
10answers
23k views

What is the purpose of 'tee'?

All the usages of tee I ever saw were such: do_something | tee -a logfile Or: do_something_else | tee logfile Is tee invented for those that don't know you can do the same with shell pipe ...
1
vote
1answer
195 views

Using “tee” to selectively log Ubuntu terminal output?

I need to log terminal output. But I only need some outputs which starts with a keyword (say starts with "error"). I use something similar to: ls | tee "log.txt" In this example command I do not ...
0
votes
1answer
35 views

Copying console output of dd to file as well as to console

I'm trying to image a hard drive using dd which is giving I/O errors. As a result I added the 'noerror' parameter, but I'd like to keep track of the errors in order to attempt recovery. My current ...
1
vote
1answer
40 views

Only last tee writes to file (possible overlap with exec?)

I try to have all my outputs redirected to a.out, except some that must also be written to b.out. I think using exec on top of tee (tee to also redirect to b.out) would be fine but tee does not look ...
0
votes
1answer
73 views

Tee causes format problems at console when running lxc-attach commands in session

I use tee to capture output of an install script to a file in the usual way. All is fine except when there lxc-attach commands executing in an LXC Linux container. For example (see attached ...
2
votes
1answer
532 views

Piping with Process substitution and joining output again

I'm trying to make use of a powerful remote server in terms of video encoding. I have a local DVD drive for ripping DVD to memory, finally residing in an mbuffer. From there, I would like to split ...
0
votes
1answer
116 views

Tee alternative (user input missed)

we are using some 3rd party interactive command line tool, and we use tee for logging what a user did - to check later if needed... The tool works the way it ask which action user want to perform and ...
3
votes
1answer
3k views

Can you prefix each line written with tee with the current date and time?

I am using the 'tee' command in order to capture the results of a long bash command to a file. Can the file I emit with tee somehow prefix each line with the timestamp of when the line was written? I'...
1
vote
1answer
59 views

Using tee, I lose my sudo privileges

I am writing an installer script and need to run it a sudo as I test it on AWS RedHat instances, so can't directly go as root. I want to write the log into a file as well as onto the screen. Nothing ...
3
votes
2answers
1k views

Let Tee Handle Carriage-Returns Better

I've written a Java-console application that repeatedly prints its status to the console using carriage-returns (\r) at the end rather than line-feeds (\n) to keep the output on one screen. I also ...
4
votes
1answer
2k views

Can I calculate the checksum of a file as I create it?

I am creating a large tar archive and I would like to create the checksum of the archive too. I could achieve it like this: $ tar cfz archive.tar.gz files $ sha256sum archive.tar.gz > archive.tar....
6
votes
1answer
3k views

Tee a script to file within itself

I'm familiar with using tee, and I know that I can simply log output with script.sh | tee file.log However, I want a seamless interface for the user. Is there a way to, within script.sh, run tee as ...
0
votes
1answer
10k views

How to install libelfg0-dev on ubuntu 16.04 LTS 64bit version

I am trying to setup Open-TEE environment by following the instruction from https://open-tee.github.io/documentation/ The Open-TEE requires installing libelfg0-dev. But when I run sudo apt-get ...
0
votes
1answer
1k views

FFmpeg command line with option tee muxer, output to video file, and image2 muxer at the same time

I would like to save still images from a video, which is on a direct http URL. At the same time I want to save the video as well. How can I use ffmpeg with its special tee muxer to save the images and ...
0
votes
1answer
148 views

How to store data from different netcat connections in separate files?

I need a server that should receive data streams, store them in files and send further. Each connection should create a file with corresponding timestamp in file name, then write to it. My solution: ...
1
vote
2answers
912 views

How to redirect stderr of python3 script using tee pipe?

I am a Debian and RedHat user. I would like to redirect stderr (module logging) from a Python3 script. The script outputs a lot of things and the part I want to capture can be fetched using: python3 ....
0
votes
1answer
543 views

extracting multiple .gz files, and printing the name of the extracted file

I would think this is easy but I'm blocking… I have a directory with a series of log files (from minecraft server…): 2014-09-28-1.log.gz 2014-09-29-1.log.gz 2014-09-30-1.log.gz 2014-10-01-1.log.gz ...
2
votes
2answers
3k views

tee causing bash scripts to hang

I have a script that calls a number of other install scripts ./script1.sh 2>&1 | tee script1.log<br> ./script2.sh 2>&1 | tee script2.log<br> ./script3.sh 2>&1 | tee ...
4
votes
6answers
7k views

How can I both pipe and display output in Windows' command line?

I have a process I need to run within a batch file. This process produces some output. I need to both display this output to the screen and send (pipe) it to another program. The bash method uses tee:...
8
votes
2answers
3k views

tee: What exactly does “--ignore-interrupts” option do?

The title basically says it all. tee has an option --ignore-interrupts: -i, --ignore-interrupts ignore interrupt signals Can anyone explain/give an example in which situation this is important? ...
-1
votes
1answer
107 views

Why the tee command output something very strange when I capture the result from VIM?

I can recognise the welcome message, like: VIM - Vi IMproved[9;35Hversion 7.3[10;29Hby Bram Moolenaar et al.[11;19HVim is open source and freely distributable[13;26HBecome a registered Vim user![14;...
0
votes
2answers
1k views

UEFI vs. ARM TrustZone

I understand UEFI has a Secure Boot feature that is now for all Win 8 (tablets, and smartphones). How does this fit in with AMR's TrustZone for example? Is UEFI like a firmware TPM that can sit as a ...
1
vote
2answers
811 views

How to log output of a part of a shell script

I'm looking for a concise solution for logging the output of a part of a shell script to a file. Additionally, I still want to be able to follow the life output on screen. From the man pages of "bash"...
1
vote
2answers
493 views

linux pipeline/tee process sequence

I think for the linux command, the pipeline: $ command1 | command2 | command3 will execute with sequence command1 -> command2 -> command3. But what about using tee: $ command1 | tee >(command2) >(...
1
vote
1answer
2k views

How to combine the tee command with interactive scripts to log the results?

From some time usually record long outputs with tee to later less them, this is awesome to review configure and make outputs and such, but fails when the script or program is installation like, asking ...
0
votes
1answer
214 views

update terminal title from standard output of long running command?

I'd like to change the title of a terminal window during a long running command (for example: git svn fetch) with values greped from the output, whilst still writing to standard output. Is this ...
37
votes
7answers
21k views

Alternative to the tee command without STDOUT

I'm using | sudo tee FILENAME to be able to write or append to a file for which superuser permissions are required quite often. Although I understand why it is helpful in some situation, that tee ...
5
votes
3answers
11k views

Use netcat as a proxy to log traffic

I want to use netcat as a proxy to log http requests and responses to files, then tail these to inspect traffic. Think wireshark. Tried the following where 'fifo' is a named pipe, 'in' and 'out' are ...
1
vote
1answer
7k views

Using tee to pipe ls and grep output into tail command without a script

I have an issue running through log files. I'm looking to use ls to create a list of files in the log directory and grep to run through for the specific instances/times the file ran. I only want to ...
70
votes
3answers
27k views

Preserve colors while piping to tee

ls -l --color=auto | tee output.log Without pipe/tee it's colored. How can I make it so that it stays colored while using tee (can be colored only on the screen, I don't care about colors in logs).
2
votes
1answer
527 views

cygwin mirrors/ repositories - tee and svn

I have run Cygwin setup using a handful of different repositories, but certain programs appear to be missing from from the ones I have tried so far. I am specifically looking for tee and svn. Which ...
3
votes
1answer
879 views

Linux: redirecting stdout and stderr

I want to write stdout to a file but also prints stdout and stderr. I tried using tee: prog | tee stdout.txt but this causes the printed stderr and stdout to be interleaved incorrectly, i.e. if the ...
10
votes
1answer
6k views

PowerShell and Tee

I use this command to see output both in the console and a file: powershell -command "my_command_1 | tee ('logs\{0}.log' -f (Get-Date -format 'yyyy.MM.dd-HH.mm'))" powershell -command "my_command_2 ...
4
votes
1answer
1k views

How to tee to stderr? (multiple sinks in one pipeline)

some_source | (tee /dev/stderr | sink_1) 2>&1 | sink_2 Seems to fail. How to do it right without of any temporaries?