Created
February 2, 2024 09:58
-
-
Save shadiabuhilal/e08d0b41441ddf54d5830d0de14cf3df to your computer and use it in GitHub Desktop.
Revisions
-
shadiabuhilal created this gist
Feb 2, 2024 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ #!/bin/bash # Function to format text as bold boldText() { tput bold echo "$@" tput sgr0 } # Function to default color text as white defaultText() { tput setaf 97 echo "$@" tput sgr0 } # Function to success color text with green successText() { tput setaf 2 echo "$@" tput sgr0 } # Function to info color text with blue infoText() { tput setaf 4 echo "$@" tput sgr0 } # Function to error color text with red errorText() { tput setaf 1 echo "$@" tput sgr0 } # Usage exmaple for bold text: echo $(boldText "Reading $ENV_FILE file.") # Usage exmaple for bold text and success color: echo $(boldText "$(successText "[DONE]:") Reading $ENV_FILE file.")