FORMAT_STRING='%b%30s%30s\n'
DEFAULT='\033[0m'
RED_ON_BLACK='\033[31;40m'
YELLOW_ON_BLACK='\033[33;40m'
REVERSED='\033[7m'
UNDERLINED='\033[4m'
BLINKING_YELLOW_ON_RED='\033[33;41;5m'
BLUE_ON_BLACK='\033[36;40m'
WHITE_ON_CYAN='\033[37;46m'
printf '%0.s1234567890' {0..9};echo
printf '%10s' {10..100..10};echo
printf '%30s%30s\n' 'Color Combination' 'Escape Sequence';printf '%-18s'
printf $FORMAT_STRING $RED_ON_BLACK'Red on Black'$DEFAULT $RED_ON_BLACK;printf '%-15s'
printf $FORMAT_STRING $YELLOW_ON_BLACK'Yellow on Black'$DEFAULT $YELLOW_ON_BLACK;printf '%-22s'
printf $FORMAT_STRING $REVERSED'Reversed'$DEFAULT $REVERSED;printf '%-20s'
printf $FORMAT_STRING $UNDERLINED'Underlined'$DEFAULT $UNDERLINED;printf '%-4s'
printf $FORMAT_STRING $BLINKING_YELLOW_ON_RED'Blinking ignored on Ubuntu'$DEFAULT $BLINKING_YELLOW_ON_RED;printf '%-17s'
printf $FORMAT_STRING $BLUE_ON_BLACK'Blue on Black'$DEFAULT $BLUE_ON_BLACK;printf '%-17s'
[enter image description here][1]printf $FORMAT_STRING $WHITE_ON_CYAN'White on Cyan'$DEFAULT $WHITE_ON_CYAN
答案 0 :(得分:0)
df = df.reset_index()
FORMAT_STRING='%b%30s%b%30s\n'
DEFAULT='\033[0m'
RED_ON_BLACK='\033[31;40m'
YELLOW_ON_BLACK='\033[33;40m'
REVERSED='\033[7m'
UNDERLINED='\033[4m'
BLINKING_YELLOW_ON_RED='\033[33;41;5m'
BLUE_ON_BLACK='\033[36;40m'
WHITE_ON_CYAN='\033[37;46m'
printf '%0.s1234567890' {0..9};echo
printf '%10s' {10..100..10};echo
printf '%30s%30s\n' 'Color Combination' 'Escape Sequence'