Chinaunix首页 | 论坛 | 博客
  • 博客访问: 906449
  • 博文数量: 75
  • 博客积分: 1216
  • 博客等级: 少尉
  • 技术积分: 1998
  • 用 户 组: 普通用户
  • 注册时间: 2012-08-11 16:20
个人简介

优秀是一种习惯

文章分类

全部博文(75)

文章存档

2014年(1)

2013年(29)

2012年(45)

分类: Python/Ruby

2012-10-08 15:26:05


将标准输出与标准错误输出的文件描述符路径调换:

[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 ~]# 
阅读(1038) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~