Skip to content

Instantly share code, notes, and snippets.

@gbaptista
Created December 10, 2023 15:07
Show Gist options
  • Save gbaptista/fed4f199c2dbe6d4ac561500b28ec074 to your computer and use it in GitHub Desktop.
Save gbaptista/fed4f199c2dbe6d4ac561500b28ec074 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Check Terminal Type
echo "Terminal Type: $TERM"
# Check for 256 Color Support
echo -e "\nChecking for 256 Color Support:"
tput colors
# Display ANSI Color Test
echo -e "\nANSI Color Test:"
for i in {0..255} ; do
printf "\x1b[38;5;${i}mcolour${i}\t"
if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then
printf "\n"
fi
done
# Check Unicode Support
echo -e "\nUnicode Test:"
echo -e "\u1440 \u1437 \u143d"
# Check Locale Settings
echo -e "\nLocale Settings:"
locale
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment