我想问下面的代码(多个if语句)是否可以转换为数组?这里:
if [ "$(egrep -l 'NU.PRODUCT' $LINE)" ]; then
VALUE='PRODUCT'
elif [ "$(egrep -il 'NU.SERVICE' $LINE)" ]; then
VALUE='SERVICE'
elif [ "$(egrep -il 'NU.COMMERCE' $LINE)" ]; then
VALUE='COMMERCE'
elif [ "$(egrep -il 'NU.EDUCATION' $LINE)" ]; then
VALUE='EDUCATION'
else
VALUE='OTHERS'
fi