블로그 이미지
바나나맛딸기우유

Tag

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
  • total
  • today
  • yesterday
2019. 12. 10. 18:12 카테고리 없음

▶ 파일을 한줄씩 읽어 각 파일 생성(예제)

더보기

#!/bin/sh

SAVE_PATH="/home/kyungwon/바탕화면/TEST/test"
i=0

while read line
do
        test[i]=$line
        echo -e "$i 번째 \c"
        #echo ${test[i]}
        echo "===file test==="
        echo "${test[i]}" > $SAVE_PATH/tt${i}.txt
        cat $SAVE_PATH/tt${i}.txt
        echo
        (( i++ ))
done < test.txt

#echo "${test[0]}" > tt.txt
#cat tt.txt

posted by 바나나맛딸기우유