Skip to content

deraffe/red_green_blue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RED GREEN BLUE

Inspired by https://utcc.utoronto.ca/~cks/space/blog/unix/ShellPipelineIndeterminate

( echo red ; echo green 1>&2 ) | echo blue

Quoting Hackaday:

You’d like to think it prints three lines: red, green, and blue. But
would you be surprised to find out that it can sometimes output
“blue green” and sometimes just output blue. The first surprise is
that it isn’t deterministic. But the second thing that is surprising
is the sometimes the entire left-hand part of the line doesn’t do
anything.

Recommended test can be found in test.sh.

source test.sh

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages