configure 결과를 화면에 뿌리고 텍스트 파일에 저장한다
Read from an input and write to a standard output and file.
Syntax
tee [OPTION]... [FILE]...
-a
--append Append to the given FILEs, do not overwrite.
-i ignore interrupt signals.
--help Display the help screen.
--version Display the version.
Examples
ls *.txt | wc -l | tee /dev/tty count.txt
In the above example the ls command would list all .txt files in the current directory, take a word count (wc) by the amount of lines (-l) and the output displayed to the /dev/tty (terminal) will be sent to the count.txt.
Note: Because the above example did not take advantage of the -a or append option if the count.txt file already existed it would have been overwritten.
Related commands
cat
iPhone 에서 작성된 글입니다.
'리눅스 > 스크립트/유틸' 카테고리의 다른 글
tar: time stamp s in the future (0) | 2011.08.26 |
---|---|
dd (주로 빈 파일 만들기, loopback 마운팅 할 때 쓰임) (0) | 2011.08.02 |
엔디안 처리하는 함수 (0) | 2011.06.06 |
busybox cross-compile (0) | 2011.06.01 |
mount 옵션비교 atime, noatime, relatime (0) | 2011.06.01 |