linux中eof是什么

linux中,EOF是自定义终止符,是“END Of File”的缩写;因为是自定义的终止符,所以eof就不是固定的,可以随意的设置别名,linux中按“ctrl+d”就代表eof,eof一般会配合cat命令用于多行文本输出,指文件末尾。

linux中eof是什么

本教程操作环境:linux7.3系统、Dell G3电脑。

linux中eof是什么

EOF是END Of File的缩写,表示自定义终止符。

既然自定义,那么EOF就不是固定的,可以随意设置别名。

在linux按ctrl-d就代表EOF。

EOF一般会配合cat能够多行文本输出.

其用法如下:

<p>还可以自定义,比如自定义:</p><pre class="brush:sql;toolbar:false"><p>样例</p><pre class="brush:sql;toolbar:false;">[root@localhost test]# cat  test.sh &gt; 123456789 &gt; abcdefghj &gt; tdss32323 &gt; EOF [root@localhost test]# cat test.sh  123456789 abcdefghj tdss32323 [root@localhost test]# cat  test.sh &gt; dddddddddd &gt; aaaaaaaaaa &gt; eeead12133 &gt; BBB [root@localhost test]# cat test.sh  dddddddddd aaaaaaaaaa eeead12133 如果想追加 cat &gt; test.sh

相关推荐:《Linux视频教程

以上就是

© 版权声明
THE END
喜欢就支持一下吧
点赞15 分享