📄 redir4.sub
字号:
minus=-# standard inputfd=0exec 3<&$fdread line <&3echo from stdin: $line# close fd 3exec 3<&${minus}# should give `bad fd', but exact error messages vary# read line <&3# standard outputfd=1exec 4>&$fdecho to stdout >&4exec 4>&$minus# should give `bad fd', but exact error messages vary# echo to stdout >&4unset fd# these are ambiguous redirectsexec 3<&$fdexec 4>&$fdexec 3>&1 4>&2exec >&/tmp/err-and-outecho to stdoutecho to stderr >&2exec 1>&3 2>&4echo /tmp/err-and-out:cat /tmp/err-and-outrm /tmp/err-and-outfd=/tmp/err-and-outexec >&$fdecho to stdoutecho to stderr >&2exec 1>&3 2>&4echo /tmp/err-and-out:cat /tmp/err-and-outrm /tmp/err-and-out
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -