Created
June 7, 2017 09:49
-
-
Save jihyeonRyu/89d5eb3c5f9c17532a10ca10a3cf0346 to your computer and use it in GitHub Desktop.
extract file randomly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# test data set을 추출하기 위함 | |
MAXCOUNT=100 | |
count=1 | |
RANGE=983 | |
DIR='/d/Source/Repos/iconRecognition2/iconRecognitionWithTF/icon_image' | |
while [ $count -le $MAXCOUNT ] # 100개 뽑을 때까지 반복 | |
do | |
echo "conunt: " $count | |
rannum=$RANDOM | |
let "rannum %= $RANGE" | |
echo "random num: " $rannum | |
echo $DIR/train/$1/[A-Za-z]*[^0-9]$rannum.png | |
mv $DIR/train/$1/[A-Za-z]*[^0-9]$rannum.png $DIR/eval/$1 | |
let "count += 1" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment