테스팅을 위한 코드
다음 명령어들을 넣어보고
bash
./pipex infile "ls -l" "wc -l" outfile
./pipex infile "grep a1" "wc -w" outfile
./pipex xxxfile ls cat outfile
실제 명령어와 같은지 판단해보자.
bash
< infile ls -l | wc -l > outfile
< infile grep a1 | wc -w > outfile
< xxxfile ls | cat > outfile