-4
한 줄씩 파일을 읽으려면 while 루프를 작성했습니다.유닉스 while 루프 오랜 시간이 걸릴
while read file
do
FileFound="`find $DataDir -name $file -print 2>/dev/null`"
if [ -n "$FileFound" ]; then
echo $FileFound >> ${runDir}/st_$Region
else
echo $file >> ${APP_HOME}/${Region}_filesnotfound_$date.txt
fi
done < ${Region}_${date}.txt
8000 레코드의 경우 완료하는 데 거의 2 일이 걸렸습니다. 어떻게 최적화합니까?
[둘러보기] (https://stackoverflow.com/tour)를 읽은 다음 [How To Ask] (https://stackoverflow.com/help/how-to-ask)를 읽으십시오. 귀하의 질문은 주제에 벗어났습니다. [Code Review] (https://codereview.stackexchange.com/)를 찾고 계십니까? –
유닉스는 프로그래밍 언어가 아닙니다. –