2022-07-31 661
EOF是END Of File的缩写,表示自定义终止符。
既然自定义,那么EOF就不是固定的,可以随意设置别名。
在linux按ctrl-d就代表EOF。
EOF一般会配合cat能够多行文本输出。
其用法如下:
<<EOF //开始 .... EOF //结束
还可以自定义,比如自定义:
<<BBB //开始 .... BBB //结束
样例
[root@localhost test]# cat << EOF > test.sh > 123456789 > abcdefghj > tdss32323 > EOF [root@localhost test]# cat test.sh 123456789 abcdefghj tdss32323 [root@localhost test]# cat << BBB > test.sh > dddddddddd > aaaaaaaaaa > eeead12133 > BBB [root@localhost test]# cat test.sh dddddddddd aaaaaaaaaa eeead12133 如果想追加 cat << EOF >> test.sh
原文链接:https://77isp.com/post/2361.html
=========================================
https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。
数据库技术 2022-03-28
网站技术 2022-11-26
网站技术 2023-01-07
网站技术 2022-11-17
Windows相关 2022-02-23
网站技术 2023-01-14
Windows相关 2022-02-16
Windows相关 2022-02-16
Linux相关 2022-02-27
数据库技术 2022-02-20
抠敌 2023年10月23日
嚼餐 2023年10月23日
男忌 2023年10月22日
瓮仆 2023年10月22日
簿偌 2023年10月22日
扫码二维码
获取最新动态