4 ms·
Make sure one has ncurses installed before switching to tput. Alpine Linux does not install this by default for what it's worth.
by LinuxBender 3y ago
Make sure one has ncurses installed before switching to tput. Alpine Linux does not install this by default for what it's worth.
- foresto 3y ago# No tput, no cry: red=$(tput setaf 1 2>/dev/null || true) echo ${red}text
- LinuxBender 3y agoYou tryin' to get Bob Marley stuck in my head? Because it worked.
- kps 3y ago`tput` is POSIX, though, so you can reasonably¹ expect it to be present. ¹ Ha, ha. The distro I use, Debian, also omits at least one POSIX standard utility by default, even though all of them used to fit nicely on systems with less disk than your current CPU's cache.