'while'에 해당하는 글 1건






cat employees.txt

byoungguk:100:server
gildong:200:sales


cat read-employees.sh

#!/bin/sh
IFS=:
echo "employee names:"
echo "---------------"
while read name empid dept
do
     echo "$name is part of $dept department"
done < ~/employees.txt




./read-employees.sh
employee names:
---------------
byoungguk is part of server department
gildong is part of sales department






저작자 표시 비영리 동일 조건 변경 허락
신고

WRITTEN BY
김병국
유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun

받은 트랙백이 없고 , 댓글이 없습니다.
secret