简体   繁体   English

如何创建bash脚本以使用一个别名执行/撤消设置区域设置?

[英]How to create bash script to do/undo setting locale with one alias?

How to create bash script (to make alias of it), doing this: 如何创建bash脚本(为其创建别名),方法如下:

if LANG=en_US.UTF-8
then "unset LANG"
else "export LANG=en_US.UTF-8"

adding

en() {
if [[ $LANG == "en_US.UTF-8" ]]
then unset LANG
else export LANG=en_US.UTF-8
fi
}

to ~/.bash_profile works! ~/.bash_profile起作用!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM