4 ms·
A little better: echo -e '\E[32;40m'; cat /dev/urandom | tr -dc 'A-F0-9'
by scdlbx 17y ago
A little better:
echo -e '\E[32;40m'; cat /dev/urandom | tr -dc 'A-F0-9'
- graywh 17y agoLess magic: tput setaf 2; tput setab 0; cat /dev/urandom | tr -dc 'A-F0-9'
- pavel_lishin 17y agoCan you explain what that does?
- ElliotH 17y agotput setaf 2 makes your prompt green tput setab 0 makes the prompt background black The rest displays random letters A-F and numbers 0-9 on your terminal.
- graywh 17y agotput setaf 2 -- queries the terminfo database for the proper escape sequence for setting the terminal foreground to color 2 (green) and echoes it, turning your foreground that color tput setaf 0 -- ditto, but for black background