[sh]
#————————————————-
# PST value set
#————————————————-
# Argument checking
if [ “$1” != “1” ] && [ “$1” != “0” ];
then
echo ‘Not argument, Please Enter!’
exit;
fi
# Variable assignment
set_value_num=$1
array=(
“/root/shell/feedWordPress/proc_st/en.pst”
“/root/shell/feedWordPress/proc_st/finance.pst”
“/root/shell/feedWordPress/proc_st/game.pst”
“/root/shell/feedWordPress/proc_st/jpn_cn.pst”
“/root/shell/feedWordPress/proc_st/jpn_en.pst”
“/root/shell/feedWordPress/proc_st/jpn.pst”
“/root/shell/feedWordPress/proc_st/love.pst”
“/root/shell/feedWordPress/proc_st/memo.pst”
“/root/shell/feedWordPress/proc_st/pc-parts.pst”
“/root/shell/feedWordPress/proc_st/pub.pst”
“/root/shell/feedWordPress/proc_st/rg.pst”
“/root/shell/feedWordPress/proc_st/sys_en.pst”
“/root/shell/feedWordPress/proc_st/sys.pst”
“/root/shell/feedWordPress/proc_st/web-service.pst”
“/root/shell/feedWordPress/proc_st/zh.pst”
)
#————————————————-
# Processing
for (( I = 0; I < ${#array[@]}; ++I ))
do
# ${array[$I]}を使った処理
echo $set_value_num > ${array[$I]}
# echo $set_value_num
done
[/sh]
コメント