更改

跳转至: 导航搜索

在bash中重定向标准错误stderr

添加193字节, 2019年3月15日 (五) 18:33
无编辑摘要
3.输入“less printsave”查看文件内容,发现不包含stderr信息(ls: cannnot access /ytyzx: No such file or directory)。
备注:默认>只操作stdout。
[[File:Stderr3.png]]
5.输入“less stouterr”查看文件内容,发现已包括stdout和stderr。
备注:2>&1意为把2(stderr)的内容重定向到1(stdout)中。
1>&2意为把1(stdout)的内容重定向到2(stderr)中。
[[File:Stderr5.png]]
1,138
个编辑

导航菜单