echo 输出到文件时加\n不换行

解决

加入-e 

# -e 开启转义
echo  -e "net.ipv4.tcp_max_tw_buckets = 20000\nnet.core.somaxconn = 65535\nnet.ipv4.tcp_max_syn_backlog = 262144\nnet.core.netdev_max_backlog = 30000\nnet.ipv4.tcp_tw_recycle = 0\nfs.file-max = 6815744\nnet.netfilter.nf_conntrack_max = 2621440" > /etc/sysctl.conf

效果

shell echo输出换行_转义