Open malongshuai opened 3 years ago
https://www.junmajinlong.com/shell/cmdline_parse_and_redirect/
Linux基础系列文章大纲Shell系列文章大纲 也许你并没有真的掌握bash的重定向今天有一位大佬问了我一个shell命令行重定向的问题。原问题如下: 123# /err是不存在的,所以ls /err会报错# /tmp存在,所以ls /tmp没有错误$ (ls /err /tmp 2>&1) >a.log 大佬疑惑的点在于,ls的标准输出和标准错误的目标分别是哪里。 对
https://www.junmajinlong.com/shell/cmdline_parse_and_redirect/
Linux基础系列文章大纲Shell系列文章大纲 也许你并没有真的掌握bash的重定向今天有一位大佬问了我一个shell命令行重定向的问题。原问题如下: 123# /err是不存在的,所以ls /err会报错# /tmp存在,所以ls /tmp没有错误$ (ls /err /tmp 2>&1) >a.log 大佬疑惑的点在于,ls的标准输出和标准错误的目标分别是哪里。 对