Add existing scripts
This commit is contained in:
1 parent
2ab5a42c2b
commit
3c05d74104
31 files changed
+1138
No files matched your search
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# Print a message in each of the 8 ANSI terminal colors
|
||||
|
||||
rainbow() {
|
||||
local message="$1"
|
||||
local reset='\e[0m'
|
||||
for ((color=31; color<=37; color++))
|
||||
do
|
||||
color_code="\\e[0;${color}m"
|
||||
if [ -t 1 ]; then
|
||||
printf "${color} - ${color_code}${message}${reset}\n"
|
||||
else
|
||||
printf "${color} - ${message}\n"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user