본문 바로가기

개발관련/Linux

shell countdown.sh

반응형
#!/bin/bash

echo ""
SECONDS=0;
COUNTDOWN=10;
while sleep .5 && ((SECONDS <= COUNTDOWN)); do
        printf '\r%s %2d %s' "After" "$((COUNTDOWN-SECONDS))" " seconds the file opens."
done
printf '\n'

 

반응형