File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ # ASCII art with rainbow colors
4+ ASCII_ART="
5+
6+ _______
7+ | __|.--.--.---.-.-----.---.-.
8+ |__ || | | _ |-- __| _ |
9+ |_______||___ |___._|_____|___._|
10+ |_____|
11+ "
12+
13+ # Rainbow colors
14+ RAINBOW_COLORS=(
15+ " \033[31m" # Red
16+ " \033[32m" # Green
17+ " \033[33m" # Yellow
18+ " \033[34m" # Blue
19+ " \033[35m" # Magenta
20+ " \033[36m" # Cyan
21+ )
22+
23+ # Function to print ASCII art with rainbow colors
24+ print_ascii_art_with_rainbow () {
25+ local art=" $1 "
26+ local colors=(" ${! 2} " )
27+ local lines=()
28+
29+ # Split the ASCII art into lines
30+ while IFS= read -r line; do
31+ lines+=(" $line " )
32+ done <<< " $art"
33+
34+ # Print each line with a different color from the rainbow
35+ local color_index=0
36+ for line in " ${lines[@]} " ; do
37+ echo -e " ${colors[$color_index]} $line "
38+ color_index=$(( (color_index + 1 ) % ${# colors[@]} ))
39+ done
40+ }
41+
42+ # Call the function to print ASCII art with rainbow colors
43+ print_ascii_art_with_rainbow " $ASCII_ART " RAINBOW_COLORS[@]
44+
345# Direktori root di mana semua sub-folder berada
446DIR=" ../automation-scripts"
547LOG_FILE=" $DIR /run_log.txt"
You can’t perform that action at this time.
0 commit comments