until do 제어문으로 좀 몇번 돌려주게끔 해주면 코드가 좀 더 깔끔하겠죠. 그냥 풀어쓰니 걸레가 됐군요. 돌고 돌아라....^^ ---------------------------------- #!/bin/sh # Donga Manhwa V 0.1 by Yang count=1 FILE=/tmp/result.tmp site1="http://www.donga.com/cartoon/dot/index.php?gubun=0101&page=1" site2="http://www.donga.com/cartoon/dot/index.php?gubun=0101&page=2" site3="http://www.donga.com/cartoon/dot/index.php?gubun=0101&page=3" otedu="http://www.donga.com/cartoon/dot/images/0101/" temp1=$(lynx -source $site1 | grep "<td><font size='2'>" | sed -e 's/<[^>]+>//g' -e 's////g') temp2=$(lynx -source $site2 | grep "<td><font size='2'>" | sed -e 's/<[^>]+>//g' -e 's////g') temp3=$(lynx -source $site3 | grep "<td><font size='2'>" | sed -e 's/<[^>]+>//g' -e 's////g') for i in ${temp1[@]} do echo $i >> ${FILE} done for i in ${temp2[@]} do echo $i >> ${FILE} done for i in ${temp3[@]} do echo $i >> ${FILE} done end_date=`tail -1 ${FILE}` until [ "$search_date" -eq "$end_date" ] do search_date=`head -$count ${FILE} | tail -1` let "count +=1" wget $otedu$search_date"_0.gif" done rm ${FILE} | mkdir -p manhwa/otedu | mv *.gif ./manhwa/otedu exit 0 -- 음냐