Skip to content

Instantly share code, notes, and snippets.

@therealbnut
Created February 28, 2016 04:25
Show Gist options
  • Save therealbnut/009409ecd54083295919 to your computer and use it in GitHub Desktop.
Save therealbnut/009409ecd54083295919 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -eu
removeLines() {
for i in $(seq ${1}); do
echo -en "\r\033[A\033[1K"
done
}
echo -e "first line\nmuch longer second line - enough to wrap maybe"
sleep 1
removeLines 2
echo "the one true line"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment