Shell 向文件中添加一行

 

参考:http://www.111cn.net/sys/linux/77821.htm

 

在explicit之后添加一行

 sed -i '/explicit/a max_allowed_packet = 32M' /etc/mysql/my.cnf