-1

when I run the bash script on my Linux machine we get the following errors in my log ,

note - we set in the script:

exec > $log 2>&1 ,  (  in order to send all standard error/output to $log ) 

the errors messages:

tput: No value for $TERM and no -T specified

in order to filter this errors messages we try to set in the bash script that:

export TERM=xterm

but without help

after digging we found that happened in some case for example when we perform ssh to remote machine and runs commands on remote machine VIA ssh

in order to avoid that we set TERM=xterm in the bash script as the following:

ssh user@$remote_machine "TERM=xterm  /tmp/script.sh"

but it’s very not elegant solution and because my script use a lot of ssh and curl command then it’s not practical solution to set this on each SSH or curl etc

so my big question is

how to filter the message – tput: No value for $TERM and no -T specified ?

so we not get these ugly message in my $log file

  • Just run sed and delete all lines in the logfile that match the string, make this sed command the last line of your shell script. – termcap Jan 16 '18 at 10:59
  • I want to do it on the fly not after log is completed – jango Jan 16 '18 at 11:05
  • why (-1) on this excellent question - what is going on this site its craze – jango Jan 16 '18 at 11:44
0

You can pipe your output with "grep --invert-match "tput: No value for \$TERM and no -T specified".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.