리눅스 read


24px-Disambig_grey.svg.png 다른 뜻에 대해서는 read 문서를 참조하십시오.

개요

read
  • 표준 입력에서 내용을 한 줄 읽어들이는 리눅스 명령어
$ cat file1.txt
hello
world
$ while read -r foo ; do echo [$foo]; done < file1.txt
[hello]
[world]
$ cat file1.txt | while read -r foo ; do echo [$foo]; done
[hello]
[world]

같이 보기

참고