Wait (명령어)
개발자 | AT&T Bell Laboratories |
---|---|
발표일 | 1973년 11월(50년 전)(1973-11) |
운영 체제 | Unix 및 Unix-like |
종류 | 명령어 |
wait은 유닉스 셸에서 백그라운드 프로세스 실행이 끝날 때까지 일시 중지하는 명령어이다.
사용법
wait [n]
여기서 n은 현재 실행 중인 백그라운드 프로세스(job)의 pid 또는 잡 ID이다. n이 지정되지 않으면 이 명령어는 알려진 모든 작업에 종료가 호출될 때까지 기다린다.
예시
#!/usr/bin/env bash # Parallel update script which makes use of the wait command # Update local copy rsync iona:src/ . & # Upgrade required libraries, or exit indicating failure if make failed for some reason make -C lib || exit 1 # Wait for rsync to terminate (may have already happened) and finish the job wait make
외부 링크
- GNU bash reference manual for the
wait
command
- v
- t
- e
유닉스 명령 줄 인터페이스 프로그램과 내부 명령어
- apropos
- help
- man
- banner
- bc
- cal
- clear
- date
- dd
- file
- history
- info
- lp
- lpr
- od
- pax
- size
- tee
- tput
- type
- uname
- whatis
- yes
- true와 false