Infra Structure/Linux

[ Linux ] shell script에서 특정 시간 동안 멈추기(sleep)

하 선생 2019. 11. 5. 20:58

쉘 스크립트에서 다음 로직으로 넘어가기 전에 잠시 실행을 멈추고 싶을때 다음과 같이 하면 된다.

 

[ shell script 간편 sleep 포맷 ]

 

sleep .5 # Waits 0.5 second.

sleep 5  # Waits 5 seconds.

sleep 5s # Waits 5 seconds.

sleep 5m # Waits 5 minutes.

sleep 5h # Waits 5 hours.

sleep 5d # Waits 5 days.


출처: https://brocess.tistory.com/84 [행복한디벨로퍼]