I have a shell script that runs in my personal terminal and in a CI environment. In the CI environment, the python calls for determining shell height/width return funny values.
I would like to do something to the effect of:
if (I am running in shell context)
determine height/width of terminal
else
don't
fi
How can I express this condition, in a bash script?
Check if standard input is a tty device.
In sh/bash:
In Python: