![]()
Siteごとコマンドは同じで、grepの後ろが変わる場合が多い。
Command.txtは置き換えで変えればいいがScriptは修正に面倒なところがあって
Keywordを選択してそれに合わせた文字列を読み込む機能を作りたかった。
# select test
echo "# Select XXX Name"
select xxx_name in "ABC" "DEF" "GHI"
do
echo ">>> ${xxx_name} is selected"
break
done
if [ ${ncs_name} == "ABC" ]; then
xxx_egrep="egrep 'xxx1|XXX-1|abc'"
source XXXXXXXXXXXXXX
elif [ ${xxx_name} == "REG" ]; then
xxx_egrep="egrep 'XXX2|XXX-2|def'"
source XXXXXXXXXXXXXX
elif [ ${xxx_name} == "EIR" ]; then
xxx_egrep="egrep 'XXX3|XXX-3|ghi'"
source XXXXXXXXXXXXXX
else
echo "What do you want to select XXX?"
fi