Whenever the output of a command is piped to another in bash, which command will the exit value (the
$? variable) be returned from? The command that the output was piped from, or the command that the output was piped to?
Say, for example, in the command:
git diff | vim -
$? variable come from the
git diff command, or the
vim - command?