linux系统中执行sed命令时卡住
应该是系统的编码问题,echo $LANG或locale 看看显示的是什么
解决方法1.是:sed -i ‘/LANG=/c LANG=zh_CN.UTF-8’ /etc/sysconfig/i18n
然后source /etc/sysconfig/i18n
最后在重启服务器
方法二:修改环境变量文件 /etc/profile
[email protected] ~]# vim /etc/profile
…
LC_ALL=“zh_CN.UTF-8”
export LANG=“zh_CN.UTF-8”
[[email protected] ~]# source /etc/profile
[[email protected] ~]# locale
————————————————
版权声明:本文为****博主「凯布斯」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.****.net/qq_23322973/article/details/87915081