tee Questions
1
Solved
I'm trying to simultaneously save the output from a tmux pane to file and stream it using netcat.
What works:
tmux pipe-pane -o -t "server" "tee -a '/home/csgoserverp/test.txt'"
echo -n "Hello Wo...
3
Solved
Here is the problem: I need to know how to get all PostgreSQL output from an executed .sql script to log to a file, including errors and query results.
I have already surrounded my script with \o ...
Lally asked 12/7, 2012 at 15:43
1
Solved
Usually if I want to print the output of a command and in addition capture that output in a file, tee is the solution. But I'm making a script using a utility which seems to have a special behaviou...
2
Solved
In the context where I want to capture the stdout of a process in a file but still want to have this output displayed in the terminal I can choose between script and tee. In this context, are these...
Frankfort asked 19/2, 2015 at 8:20
8
Solved
The manual states that tee is a "pipe fitting"-tool. The cases [1] confuse me:
1. case
echo "foo bar" | sudo tee -a /path/to/some/file
2. case
:w !sudo tee %
It is hard ...
0
I read about the new key attestation API in Android N and wanted to test it but I'm missing some classes.
The key attestation is described here: https://developer.android.com/preview/features/key-...
1
Solved
I want to see the entire output of my script but only save lines matching "vlim" to a new file. I've nearly figured it out but can't quite get it to work the way I want it to. I'm currently stuck b...
1
Solved
Using bash process substitution, I want to run two different commands on a file simultaneously. In this example it is not necessary but imagine that "cat /usr/share/dict/words" was a very expensive...
2
Solved
I want to pipe stdout to multiple files, but keep stdout itself quiet. tee is close but it prints to both the files and stdout
$ echo 'hello world' | tee aa bb cc
hello world
This works but I wo...
0
This thread is an extension of this thread where the interruption (CTRL-c) stop the data transfer into less.
I would like to create a similar system monitoring data conversion as is found in fdupe...
Wonderland asked 25/6, 2015 at 11:12
4
Solved
To redirect (and append) stdout and stderr to a file, while also displaying it on the terminal, I do this:
command 2>&1 | tee -a file.txt
However, is there another way to do this such tha...
5
Redirecting stdout+stderr such that both get written to a file while still outputting to stdout is simple enough:
cmd 2>&1 | tee output_file
But then now both stdout/stderr from cmd are c...
3
I have a tree structure of objects. I need to iterate over all the items ("values") in the leaves. For this I'm currently using generator methods as illustrated below:
class Node(object):
def __i...
Wallack asked 30/4, 2014 at 22:10
1
Solved
I am trying to log everything that comes out of stdout and stderr into a log file and still preserve the console. For this, I just appended: |& tee -a log_file.log to every command.
However, I ...
1
Solved
I have a python script that looks something like this:
for item in collection:
print "what up"
#do complicated stuff that takes a long time.
In bash, I run this script by doing the follo...
2
Solved
I am processing a text file with multiple parallel processes spawned by xargs. I also need to capture the stdout from each process into a separate log file. Below is an example where the output fro...
3
Solved
My script accepts a stream on stdin. I want to pass the first line through to stdout no matter what, and grep the remaining lines with -v and also pass those out to stdout.
I worked out a solution...
1
Solved
I'm trying to write a script the essentially acts as a passthru log of all the output created by a (non-interactive) command, without affecting the output of the command to other processes. That is...
Lambert asked 30/1, 2014 at 19:3
4
Solved
I have made a toy interactive console program that is basically an interpreter:
$ myprogram
> this is user input
this is program output
I want to pipe the full session, both user input and pr...
5
I'm looking for a way in C to programmatically (ie, not using redirection from the command line) implement 'tee' functionality such that my stdout goes to both stdout and a log file. This needs to ...
4
Solved
I am trying to use the tee command to redirect output to a file, and I want the file to be created in a dir which is yet to be created.
date | tee new_dir/new_file
when new_dir is not there, the...
2
Solved
I sometimes want to output the contents of a pipe in the middle (don't we all?).
I generally do it like this (yes, I know there are other, probably better, ways):
terminal=$(tty)
echo hello worl...
1
Solved
In a reply to Piping a file through tail and head via tee, a strange behaviour of head has been observed in the following construct when working with huge files:
#! /bin/bash
for i in {1..1000000}...
Kizzee asked 21/5, 2013 at 7:17
1
Starting from here I tried to read a file and emit the head and the tail of the file (reading the file only once).
I tried the following:
tee >(head) >(tail) > /dev/null < text.t...
2
Solved
tee reads from standard input and writes to standard output and a file.
some_command |& tee log
Is that possible for tee to write to a compressed file?
some_command |& tee -some_option...
Malva asked 28/3, 2013 at 2:44
© 2022 - 2024 — McMap. All rights reserved.