Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/bash
- #BASH rotater paste by:
- #kaslmineer7999
- rotater(){
- local frames=('|' '/' '-' '\')
- local frame="0"
- local command="$1"
- while [ 1 ]
- do
- printf "%s\r" "${frames[$frame]}"
- local frame="$(($frame+1))"
- [ "$frame" = "4" ] && local frame="0"
- sleep 0.1
- done &
- local pid=$!
- eval $command
- kill -9 $pid
- }
- #SYNTAX: rotater "YOUR_COMMAND"
- #Note to replace "YOUR_COMMAND" with your actual command, keep in quotes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement