手动创建目录

手动在统版服务器创建目录,执行:

creatDir.sh 3 20140406

creatDir.sh 4 20140406


#!/usr/bin/ksh

workPath=/etlshare/ecifftp

if [ $# -ne 2 ];then
   echo "create dir err"
   exit -1
fi

apFlag=$1

if[ $apFlag -eq 3 ];then
bankid="11 12 13 14 15 21 22 23 31 32 33 34 35 36 97"
else
bankid="37 41 42 43 44 45 46 50 51 52 53 54 61 62 63 64 65"
fi

fileName=$2

for bank in $bankid
do
mkdir -p $workPath/$fileName/$bank
chmod 777 $workPath/$fileName
chmod 777 $workPath/$fileName/$bank
done


你可能感兴趣的:(Shell,shell,file,服务器)