Last active
June 2, 2020 12:00
-
-
Save thomasloven/ede19551cf2b00baec6c719ebe684c8d to your computer and use it in GitHub Desktop.
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 characters
#!/usr/bin/env bash | |
MD5="md5" | |
HOSTNAME=`hostname -s` | |
if [[ -n $1 ]]; then HOSTNAME=$1; fi | |
HASH=`echo ${HOSTNAME} | ${MD5}` | |
echo -n -e "\033[38;05;$((0x${HASH:4:6}))m" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment