摘要: 1、简单的命令行重定向问题。 例:ls -al test test1 test2 1>out.txt 2>err.tx 这里ls这句命令行命令之后将标准输入重定向到out.txt中,标准错误重定向到err.txt中。2、文件中临时重定向题 例:$ cat test1 #!/bin/bash #!关于测试临时重定向问题 echo "This is an error!" >&2 #将这句话临时重定向为标准错误 echo "This is normal output! " 正常运行这个脚本:./test1 结果为:This is an 阅读全文
posted @ 2013-07-03 21:59 风情云淡~ 阅读(374) 评论(0) 推荐(0) 编辑