shellecho单⾏和多⾏⽂字定向写⼊到⽂件中单⾏⽂本:
#!/bin/bash
echo"192.168.85.24 tsedb">> /etc/hosts
多⾏⽂本:
<<EOF告诉主shell,后续的输⼊,是其他命令或者⼦shell的输⼊,直到遇到EOF为⽌
#!/bin/bash
cat > /etc/f<< EOF
#tsedb SETTING
tsedb soft nproc 16384
tsedb hard nproc 16384
tsedb soft nofile 16384
tsedb hard nofile 65536
tsedb soft stack 10240
shell创建文件并写入内容tsedb hard stack 32768
tsedb hard memlock 8000000
tsedb soft memlock 8000000
EOF

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。