Last active
March 31, 2023 05:28
-
-
Save bluetigeresw/b0c9cf9dbd9c92c0a408182a7a59c709 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
COUNT_DOWN=5 | |
function initialize { | |
source <LOCATION> | |
<ANY_COMMANDS> | |
} | |
function titleHandler { | |
local title="<SCRIPT_NAME>@$USER" | |
echo -ne "\033]0;$title\007" | |
} | |
while : ; do | |
titleHandler | |
initialize | |
for (( i=$COUNT_DOWN; i >= 0; i-- )) | |
do | |
echo "Restart after $i seconds , or press Ctrl+c" | |
sleep 1 | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment