帮助我从ABS指南中了解bash中这个简单的io重定向

Ank*_*wal 7 unix linux bash shell

exec 3>&1                           # Save current "value" of stdout.  
ls -l 2>&1 >&3 3>&- | grep bad 3>&- # Close fd 3 for 'grep' (but not 'ls').  
#              ^^^^   ^^^^
exec 3>&-                           # Now close it for the remainder of the script.  
Run Code Online (Sandbox Code Playgroud)

我得到第3行,fd 3正在关闭.

怀疑:第一行将fd 3重定向到stdout,全球......对吗?
问题:第二行发生了什么?如果可能,请提供详细说明.

Sie*_*geX 2

这可能是我发现的最好的重定向教程。每当我看到一些奇怪的重定向发生时,我都会参考它来帮助我解决它。