Last active
February 7, 2025 12:10
-
-
Save Integralist/52f5787154bf516628c8777dc3455a99 to your computer and use it in GitHub Desktop.
[Bash update same line for progress bar reporting] #bash #shell #progress
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
echo -ne "Getting the TLS entries from 1Password... ⌛\r" | |
sleep 2 # Simulate some processing | |
echo -ne "Getting the TLS entries from 1Password... ✅\n" | |
# -n prevents echo from automatically adding a newline. | |
# -e enables interpretation of escape sequences like \r (carriage return). | |
# \r moves the cursor back to the start of the line, so the next echo overwrites it. | |
# The final \n ensures the cursor moves to a new line after displaying the ✅. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment