将标准输出与标准错误输出的文件描述符路径调换:
[root@station ~]# adfasdf | cat
-bash: adfasdf: command not found
[root@station ~]# adfasdf | cat > 123.txt
-bash: adfasdf: command not found
[root@station ~]# cat 123.txt
[root@station ~]# adfasdf 3>&1 1>&2 2>&3- | cat > 123.txt
[root@station ~]# cat 123.txt
-bash: adfasdf: command not found
[root@station ~]#
阅读(1088) | 评论(0) | 转发(0) |