Can’t reproduce.
16:22:48:~/tmp$ echo foo | sudo tee newfile
[sudo] Passwort für bleistift2:
foo
16:23:02:~/tmp$ ls -l newfile
-rw-r--r-- 1 root root 4 Feb 23 16:22 newfile
Can’t reproduce.
16:22:48:~/tmp$ echo foo | sudo tee newfile
[sudo] Passwort für bleistift2:
foo
16:23:02:~/tmp$ ls -l newfile
-rw-r--r-- 1 root root 4 Feb 23 16:22 newfile
My initial guess was that sudo would eat up the echo’d foo as the password. Maybe
sudo
works differently when invoked via zsh?