Re:ASCII Delimited Text – Not CSV or TAB delimited text
by raldi on Wednesday March 26, 2014 @04:55PM
(#7476592)
Sure, the default is overridable, and the character has no magic effect when found in a binary file, but there's a reason Ctrl-D was chosen as the standard keystroke sequence to end a stdin transaction, and it has everything to do with the fact that "D" shows up next to "end of transmission" in `man ascii`.
Re:ASCII Delimited Text – Not CSV or TAB delimited text
by thwarted on Wednesday March 26, 2014 @10:57PM
(#7478297)
Thank you for clarifying something that no one was disputing or event mentioned.
Re:ASCII Delimited Text – Not CSV or TAB delimited text
by qu4z-2 on Wednesday March 26, 2014 @11:44PM
(#7478470)
Yeah, I hate it when people point out interesting things I didn't know before too.
Re:ASCII Delimited Text – Not CSV or TAB delimited text
by thwarted on Thursday March 27, 2014 @03:21AM
(#7479046)
I'm sure raldi can repeat, again, making it 3 times, that control-d means end of transmission and that's why it was chosen for signalling end of stdin, on a thread about how to type the control characters.
This is slightly different than being able to actually generate those characters as input. If you put a control-d in a file, nothing will stop reading the file when it sees the control-d, it's just another byte. readline knows how to interpret a bunch of control characters. There's also the terminal driver that has interpretations, which you can see with `stty -a`. When the tty layer sees a control-d or a control-c, it closes stdin or generates SIGINT, respectively. But even this can be dependent on if you're on a pty or attached directly to a serial line. There's nothing special about the mapping of control-d to end-of-transmission character, that's just how the layer that sees it is interpreting it. You can, for example, change how control-c is interpreted by `stty intr ^B`, which will make control-b generate SIGINT. And there's a way to put the terminal driver in complete transparent/passthru mode.