When piping a command, only the standard output is sent through the pipe. To send the standard error as well, we use
cmd1 |& cmd2
cmd1 2>& | cmd2
Table 4.1: Redirections and Pipes.