zsh-workers
 help / color / mirror / code / Atom feed
* broken pipe message with setopt PRINT_EXIT_VALUE
@ 2021-05-28 17:06 Samuel Bancal
  2021-05-28 20:01 ` Stephane Chazelas
  0 siblings, 1 reply; 8+ messages in thread
From: Samuel Bancal @ 2021-05-28 17:06 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]

Dear zsh workers,

I'm using zsh on Ubuntu 20.04 (and oh-my-zsh).

When running the following command, I get the following error.

< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c 32; echo;
XKCxcd1QQ8otBre05qUDrvw2GFIdpYNr[1]    97774 broken pipe  tr -dc 
_A-Z-a-z-0-9 < /dev/urandom |
        97775 done         head -c 32

The expected output is :

< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c 32; echo;
XKCxcd1QQ8otBre05qUDrvw2GFIdpYNr

After investigations ( https://stackoverflow.com/q/67738240/446302 ) it 
seems to be related to the fact that I have set the option setopt 
PRINT_EXIT_VALUE in my ~/.zshrc

Steps to reproduce :

  * install Ubuntu 20.04
  * sudo apt install zsh
  * zsh # populate your ~/.zshrc with recommended configuration
  * < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c 32; echo;
    # that works as expected -> give a random 32 chars
  * setopt PRINT_EXIT_VALUE
  * < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c 32; echo;
    # expected output + a broken pipe error message

What do you think of it ?

Regards,
Samuel Bancal


-- 
*Samuel Bancal*
/IT Eng /
*ENAC-IT *
/GR A0 464/
EPFL

ENAC-IT is opening a new branch IT4Research 
<https://www.epfl.ch/schools/enac/about/data-services-en/> /to better 
support our labs in leveraging data in their research! Contact us with 
any questions related to data management, / /data valorization, data 
science and computational tools.
/


[-- Attachment #2.1: Type: text/html, Size: 4587 bytes --]

[-- Attachment #2.2: nkpjlfilkffncmgb.png --]
[-- Type: image/png, Size: 984 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-05-30 17:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 17:06 broken pipe message with setopt PRINT_EXIT_VALUE Samuel Bancal
2021-05-28 20:01 ` Stephane Chazelas
2021-05-28 21:26   ` Bart Schaefer
2021-05-29  6:37     ` Samuel Bancal
2021-05-29 11:43     ` Daniel Shahaf
2021-05-29 15:52       ` Bart Schaefer
2021-05-30 12:29         ` Daniel Shahaf
2021-05-30 17:44           ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).