Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Show HN: Useful scripts and environment setup for coding in VPS. Parent comment
In my scripts, I just check for unset term and/or use tput to get the sequences (which honors TERM=dumb)
one example:
col_ok=`tput bold; tput setaf 7; tput setab 2` col_fail=`tput bold; tput setaf 7; tput setab 1` col_end=`tput sgr0` echo "${col_fail} ERROR: it failed ${col_end}"
TERM=dumb <script>
There are no comments on this comment yet.
In my scripts, I just check for unset term and/or use tput to get the sequences (which honors TERM=dumb)
one example:
so running the script gives me colorized output (xterm-256color), but running it like this: gives plain text