写真に示すように:
WHO=`whoami | grep "${
USER}$"`
if [ -z ${WHO} ]; then
echo
echo "Please change to \"${
USER}\" user mode first!"
echo
exit 1
fi
アラームの理由:
`...`方式是老的语法,建议使用新的$(...)语法
変更されたスクリプト:
WHO=$(whoami | grep "${
USER}$")
if [ -z ${WHO} ]; then
echo
echo "Please change to \"${
USER}\" user mode first!"
echo
exit 1
fi
もう警告はありません