#!/bin/bash dance_pikachu() { local frame1="\n (\__/)\n (o^.^)\n z(_(\")(\")\n" local frame2="\n (\__/)\n (^o^)\n ((_)(\"))\n" local frame3="\n (\__/)\n (o^.^)\n z(_(\")(\")\n" local frame4="\n (\__/)\n (^o^)\n ((_)(\"))\n" # Print a frame function print_frame() { # Move cursor to the top-left of the current terminal window tput cup 0 0 echo -e "$1" } # Save cursor position and clear screen initially tput sc # Infinite loop to cycle through frames while true; do print_frame "$frame1" sleep 0.5 print_frame "$frame2" sleep 0.5 print_frame "$frame3" sleep 0.5 print_frame "$frame4" sleep 0.5 done } # Example of calling the function in a background shell #dance_pikachu & # Capture the background process ID PID=$! if command -v brew &> /dev/null; then brew --version else /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" fi brew install sitemap.xml #(sleep 3; kill $PID; clear)&