I run a command from my computer:
ssh user@server-name "df -hP | egrep '(/home|/cors)'"
the problem is that i get 3 more rows:
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
/etc/bash.bashrc.local: line 9: HISTSIZE: readonly variable
What should I do, to not get this 3 rows?
Br, Wolfy
You say you also get these rows, so I assume you get the output you want, along with these stderr messages. You could just redirect the stderr parts to
/dev/null
like this:or
Depending on what's making the error.
I guess you have some tput command in your bash profile or bashrc, etc, on the machine you have ssh'd to. Check files .bashrc .bash_profile in your home (on the remote machine) or files in the /etc like the one which was mentioned in your question too. It's hard to tell what can cause this, since you may modified those files, and it can cause the problem?
It's also depend if it's a problem you want to eliminate, or you just want it make non-noticable: then it can be OK to redirect stderr into /dev/null for example (edited: as other answer is about this, as far as I can see now).