Last active
November 8, 2023 20:55
-
-
Save deepakgudla/3c8d0d5468777a1a5834c0b754881308 to your computer and use it in GitHub Desktop.
surprise.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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