#!/bin/bash
# ./test.sh ./test jpg
if [ "$#" -ne "2" ]
then
echo "error argument, format: file path + file type"
exit
fi
cd $1
echo "$1"
SRC_PATH="$1"
ICON_TYPE="$2"
BASE=`pwd`
NUM=1
#echo "$BASE"
set `date`
DST_PATH="$BASE/$2_$3_$5_OUT"
echo "$DST_PATH"
mkdir $DST_PATH
for filename in `ls ./ | grep $ICON_TYPE `
do
echo "$filename"
cp $filename "$DST_PATH/$NUM.$ICON_TYPE"
(( NUM = NUM +1 ))
echo "$NUM"
done
cd ..
阅读(903) | 评论(0) | 转发(0) |