Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piping through tee doesn't work #138

Open
tansy opened this issue Mar 25, 2024 · 2 comments
Open

Piping through tee doesn't work #138

tansy opened this issue Mar 25, 2024 · 2 comments

Comments

@tansy
Copy link
Contributor

tansy commented Mar 25, 2024

Whenever I want to write result from the screen to file I redirect or pipe through tee (1) but here it doesn't work. Nothing gets onto the screen, only at the end of the program it is written to the file, along with Bunch of other logging stuff.

I don't know where it come from as program uses printf() to write on the screen/stdout.

$ lzbench -ezlib,1 lzbench > log
$ lzbench -ezlib,1 lzbench | tee log
@ChristianSchindler
Copy link

I used ./lzbench -r -v -elz4/zstd/snappy silesia > result.txt and it did work for me

@tansy
Copy link
Contributor Author

tansy commented Apr 4, 2024

And what did you see on the screen?

Same with tee, but one would expect to see something on the screen.

Try this (below) and check the difference between lzbench file | tee log.

$ while [ true ]; do echo $i; i=$((i+1)); sleep 1; done | tee log

And compare it to this (which is what you propose):

$ while [ true ]; do echo $i; i=$((i+1)); sleep 1; done > log

Do you see a difference?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants