Created
February 7, 2025 03:11
-
-
Save hinananoha/910b8430ffa5d504331d96b51cd7ea45 to your computer and use it in GitHub Desktop.
無限 done do done 酒場
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 | |
function trap_sigint() { | |
echo -n "酒場" | |
echo "" | |
echo "$(( i / 2 )) Beer and Gyoza." | |
if [ $(( i % 2 )) -eq 0 ]; then | |
echo "帰宅成功" | |
else | |
echo "帰宅失敗" | |
fi | |
exit 1 | |
} | |
trap trap_sigint sigint | |
i=1 | |
while : ;do | |
if [ $(( i % 2 )) -eq 0 ]; then | |
echo -n "do " | |
else | |
echo -n "done " | |
fi | |
((i++)) | |
sleep 0.1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使い方
bash donedodonebar.sh
します以上です。