Created
July 25, 2024 09:53
-
-
Save yanqd0/adb56cb8599295b409368c798d32af9b to your computer and use it in GitHub Desktop.
Print something when waiting for background process.
This file contains hidden or 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 | |
echo "$@" | |
"$@" & | |
jobs -n | |
while [[ -z $(jobs -n) ]] | |
do | |
echo Wait... | |
sleep 2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment