4 ms·
bash is a bad example for these types of interview questions because, as others have noted, bash disables many of these tty features and handles them in-process
by throwaway09223 4y ago
bash is a bad example for these types of interview questions because, as others have noted, bash disables many of these tty features and handles them in-process.
Another example: The author touches on line discipline, but then makes the mistake of saying "The command is actually stored in the TTY after it is typed and before the Enter key is pressed" This isn't true in bash, or on any modern shells that support line editing features like tab completion.
If you're going to use this for an interview question, I suggest using cat(1) instead -- it will behave as the author suggests.