Skip to content

Instantly share code, notes, and snippets.

@deepakgudla
Last active November 8, 2023 20:55
Show Gist options
  • Save deepakgudla/3c8d0d5468777a1a5834c0b754881308 to your computer and use it in GitHub Desktop.
Save deepakgudla/3c8d0d5468777a1a5834c0b754881308 to your computer and use it in GitHub Desktop.
surprise.sh
#!/bin/bash
# Function to check if a command is available
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Check if figlet is installed, and install it if not
if ! command_exists figlet; then
echo "Installing figlet..."
sudo apt-get install figlet # Use the appropriate package manager for your system
fi
# Check if lolcat is installed, and install it if not
if ! command_exists lolcat; then
echo "Installing lolcat..."
sudo gem install lolcat
fi
# Run the figlet and lolcat command
figlet -f starwars "Hello world" | lolcat -a -d 30 --speed=60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment