I have a shell script in server A and I have a shell script in server B. My logic is written like shell script in A gets executed and it calls a shell script in server B and executes it. I am able to get the desired result when A executes B, but getting an error also along with the result. Error Message:
tput: No value for $TERM and no -T specified
I am using the following lines for getting output in color;
RED=`tput setaf 1`
GREEN=`tput setaf 2`
YELLOW=`tput setaf 3`
BLUE=`tput setaf 6`
BOLD=`tput bold`
RESET=`tput sgr0`
These lines are available in the shell script in both A and B. When I execute the shell script in B by logging into server B, the desired output comes along with the color. When I call the shell script from A and execute it, I am getting desired result plus the error message which I mentioned above.
Can you help in this regard?
FYI, I checked "echo $TERM"
and output is 'xterm'
in both the servers.
Not sure where I am going wrong.