Loading... ####重定向符号 重定向的意思就是“将数据传递其他地方” | 符号 | 解释| | ------------ | ------------ | |> |输出覆盖重定向 | | >> |输出追加重定向 | | <和<<| 标准输入重定向 | ####案例 ``` 1、读取文件内容,且写入到另一个文件中(覆盖) cat yus.txt > ./yus1.txt ``` ![](https://woain.cn/usr/uploads/2021/04/3280598101.png) ------------ ``` 2、追加写入文件内容(多写可以追加) cat yus.txt >> ./yus1.txt ``` ![](https://woain.cn/usr/uploads/2021/04/20556085.png) ------------ ``` 3、重定向写入符号(将文件内的传递给命令符) cat < yus2.txt ``` ![](https://woain.cn/usr/uploads/2021/04/3499081475.png) ------------ ``` 4、将文本内容拆分成多行 xargs命令 xargs -n 3 < shu.txt ``` ![](https://woain.cn/usr/uploads/2021/04/1842759560.png) ------------ ``` 4、重定向追加写入符 cat >> yus.txt <EOF > > >EOF #EOF开始,EOF结尾 ``` ![](https://woain.cn/usr/uploads/2021/04/3309896136.png) 最后修改:2021 年 04 月 09 日 © 允许规范转载 打赏 赞赏作者 赞 如果觉得我的文章对你有用,请随意赞赏