我如何缩短这个shell脚本?
CODE="A"
if test "$CODE" = "A"
then
PN="com.tencent.ig"
elif test "$CODE" = "a"
then
PN="com.tencent.ig"
elif test "$CODE" = "B"
then
PN="com.vng.pubgmobile"
elif test "$CODE" = "b"
then
PN="com.vng.pubgmobile"
elif test "$CODE" = "C"
then
PN="com.pubg.krmobile"
elif test "$CODE" = "c"
then
PN="com.pubg.krmobile"
elif test "$CODE" = "D"
then
PN="com.rekoo.pubgm"
elif test "$CODE" = "d"
then
PN="com.rekoo.pubgm"
else
echo -e "\a\t ERROR!"
echo -e "\a\t CODE KOSONG"
echo -e "\a\t MELAKUKAN EXIT OTOMATIS"
exit
fi
example.org
,example.net
等等,因为这些领域是专门为此目的保留在RFC 2606和永远不会被用于真正的实体。
bash
代码吗?还是您还有其他想法?