alias vc='_(){ local file=${1:-blah};(($#<1))||[[ "${1}" =~ ^- ]]&&echo "Usage: vc <file>"&&return 1;[[ ! -e "${file}" ]]&&echo "File ${file} not found."&&return 1; echo "${file}:";paste <(for a in $(grep -Po "(?<=\b0x)[[:xdigit:]]{6}\b" "${file}"); do perl -e "foreach \$a(@ARGV){print \"\e[48;2;\".join(\";\",unpack(\"C*\",pack(\"H*\",\$a))).\"m \e[49m \"};print \"\n\"" "$a"; done) <(grep -P "(?<=\b0x)[[:xdigit:]]{6}\b" "${file}");}; _'
Thursday, October 3, 2019
View File Hex Colors
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment