파이프, 리다이렉션
파이프
command1 | command2
command1 |& command2
# file.txt의 내용을 읽어서, grep의 입력으로 전달
cat file.txt | grep a리다이렉션
리다이렉션
내용
# 파일 입력
command < infile
cat < file.txt
# 파일 출력
command > outfile # overwrite
command >> outfile # insert
command >& outfile # overwrite, 표준에러포함
command >>& outfile # insert, 표준에러포함2>&1과 /dev/null
구분
파일 디스크립터
Last updated