Re:C to Go: Could Go replace C?
by k_kisiel on Wednesday May 11, 2011 @04:48AM
(#2535692)
Agreed. Besides crappy formatting, he also makes his programs do confusing things. Why does the first example run in the infinite loop?
[ Parent
| on HN ]
Because that's what the "yes" utility does:
"By itself, the yes command outputs 'y' or whatever is specified as an argument, followed by a newline repeatedly until stopped by the user or otherwise killed; when piped into a command, it will continue until the pipe breaks (i.e., the program completes its execution)."
From the first line of the man page for yes:
yes - output a string repeatedly until killed
Re:C to Go: Could Go replace C?
by maartenscholl on Wednesday May 11, 2011 @05:29AM
(#2535759)
The first example is a basic implementation of the 'yes' unix shell utility.