聊聊重定向

聊聊重定向

Published on Jun 22
11:04
一分钟聊聊Linux命令行
0:00
0:00
<p style="font-size:16px;color:#333333;line-height:30px;font-family:Helvetica,Arial,sans-serif;font-weight:normal;hyphens:auto" data-flag="normal" lang="en">cat  >test 《end</p><p style="font-size:16px;color:#333333;line-height:30px;font-family:Helvetica,Arial,sans-serif;font-weight:normal;hyphens:auto" data-flag="normal" lang="en">hi cat</p><p style="font-size:16px;color:#333333;line-height:30px;font-family:Helvetica,Arial,sans-serif;font-weight:normal;hyphens:auto" data-flag="normal" lang="en">this is delimiter</p><p style="font-size:16px;color:#333333;line-height:30px;font-family:Helvetica,Arial,sans-serif;font-weight:normal;hyphens:auto" data-flag="normal" lang="en">end<br /><br />cat test<br />hi cat<br />this is delimiter<br />注意,分割符前面的是两个小于号,但是喜马拉雅输入两个小于号就显示出错,用书名号代替!<br /><br />ls test 12315 >/dev/null 2>&1<br />输出为空,即标准输出与标准错误输出都不输出<br /><br /><br />ls test 12315 2>&1 >/dev/null <br />ls: 无法访问'12315': 没有那个文件或目录<br />标准输出为空,输出了标准错误输出</p>
聊聊重定向 - 一分钟聊聊Linux命令行 - 播刻岛