I noticed that when trying to capture output of a command to a bash variable, some lines are not captured at all, although they are printed on the terminal when variable assigning is not done. One example is ssh-keyscan
, when banner messages are enabled. Another example is access logs from a Python SimpleHTTPServer
.
How are these getting printed on the terminal but not captured to a variable?