shell echo单行和多行文字定向写入到文件中
发布日期:2021-05-09 00:22:44 浏览次数:9 分类:博客文章

本文共 361 字,大约阅读时间需要 1 分钟。

单行文本:

#!/bin/bashecho "192.168.85.24 tsedb">> /etc/hosts

 

多行文本:

<<EOF告诉主shell,后续的输入,是其他命令或者子shell的输入,直到遇到EOF为止

#!/bin/bashcat > /etc/security/limits.conf<< EOF#tsedb SETTINGtsedb soft nproc 16384tsedb hard nproc 16384tsedb soft nofile 16384tsedb hard nofile 65536tsedb soft stack 10240tsedb hard stack 32768tsedb hard memlock 8000000tsedb soft memlock 8000000EOF

 

上一篇:Oracle执行查询报错ORA-01034: ORACLE not available
下一篇:mongodb服务挂了重启日志报错Out of memory

发表评论

最新留言

网站不错 人气很旺了 加油
[***.192.178.218]2025年04月15日 02时02分44秒