ctrl-d appends characters to output
Matthias Apitz
guru at unixarea.de
Sat Jan 17 19:49:15 UTC 2015
El día Saturday, January 17, 2015 a las 11:43:08AM -0800, John-Mark Gurney escribió:
> The D is not getting appended to your output... If you changed your
> printf to include a space or two before the new line, you wouldn't
> see the D... the D is left after the kernel echoed ^D in response to your
> ctrl-D. If you redirect the output to a file and examined the output,
> there would be no D in your output... Or if you provided input from
> another source that didn't require an EOF to trigger it, such as:
> $echo | ./t
> 1
$ echo -n '' | ./a.out
0
matthias
--
Matthias Apitz, guru at unixarea.de, http://www.unixarea.de/ +49-170-4527211
1989-2014: The Wall was torn down so that we go to war together again.
El Muro ha sido derribado para que nos unimos en ir a la guerra otra vez.
Diese Grenze wurde aufgehoben damit wir gemeinsam wieder in den Krieg ziehen.
More information about the freebsd-hackers
mailing list