Skip to content

Instantly share code, notes, and snippets.

@Integralist
Last active February 7, 2025 12:10
Show Gist options
  • Save Integralist/52f5787154bf516628c8777dc3455a99 to your computer and use it in GitHub Desktop.
Save Integralist/52f5787154bf516628c8777dc3455a99 to your computer and use it in GitHub Desktop.
[Bash update same line for progress bar reporting] #bash #shell #progress
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