2
bash 스크립트에서 stdout을 한 줄씩 캡처하는 방법
bash 스크립트에서는 긴 명령의 표준 출력을 한 줄씩 캡처하여 초기 명령이 계속 실행되는 동안 분석하고보고 할 수 있습니다. 이것이 내가 상상할 수있는 복잡한 방법입니다. # Start long command in a separated process and redirect stdout to temp file longcommand > /tmp/tmp$$.out & #loop until process completes ps cax | grep …