Skip to content

Instantly share code, notes, and snippets.

View alifhaikal88's full-sized avatar
💭
I may be slow to respond.

Alif Haikal Razak alifhaikal88

💭
I may be slow to respond.
  • Squickydoodle
  • Germany
View GitHub Profile
#!/usr/bin/env bash
# Formatting constants
export BOLD=`tput bold`
export UNDERLINE_ON=`tput smul`
export UNDERLINE_OFF=`tput rmul`
export TEXT_BLACK=`tput setaf 0`
export TEXT_RED=`tput setaf 1`
export TEXT_GREEN=`tput setaf 2`
export TEXT_YELLOW=`tput setaf 3`
#!/usr/bin/env bash
# tputdemo.sh
echo -e "\n$(tput bold) reg dim bld und tput-command$(tput sgr0)"
for i in $(seq 0 15); do
for k in sgr0 dim bold smul; do
echo -n " $(tput $k)$(tput setaf $i)Text$(tput sgr0)"
done
echo " \$(tput setaf $i)"
done