HGJ515
请叫我阿进
2017-07-14 09:02

shell的这个脚本每一段具体的意思求大神解释!!!

  • 脚本
  • shell

VAR=254096
export KEY_NO=
BINSUFFIX=".bin"
CI_KEY="CI_KEY_"
export BINFILENAME=
export BINFILENAME2=

ls ./oldkey/ -1 >keylist.txt

sed -i "s/.bin//g" keylist.txt
for KEY_NO in $(cat keylist.txt)
do
BINFILENAME=${KEY_NO}${BINSUFFIX}
BINFILENAME2=${CI_KEY}${VAR}${BINSUFFIX}
cp ./oldkey/$BINFILENAME ./newkey/
mv ./newkey/$BINFILENAME ./newkey/$BINFILENAME2
VAR=$[VAR+1]
done

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐