This Bash script creates a colorful digital clock in the terminal, displaying the current time in green.
-
Ensure execution permissions:
chmod +x colorful_clock.sh
-
Run the script:
./colorful_clock.sh
Modify Red
, Green
, and Blue
variables to change text colors.
Red=$'\e[1;31m'
Green=$'\e[1;32m'
Blue=$'\e[1;34m'
#!/bin/bash
Red=$'\e[1;31m'
Green=$'\e[1;32m'
Blue=$'\e[1;34m'
while true; do
clear
echo $Green $(date +%T)
sleep 1s
done
This script is provided under the MIT License.