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:

ssh user@server-name "df -hP | egrep '(/home|/cors)' 2>/dev/null"


ssh user@server-name "df -hP 2>/dev/null | egrep '(/home|/cors)'"

Depending on what's making the error.

  • ssh user@server-name "df -h | egrep '(/home|/cors)'" 2>/dev/null solved the problem... tnx – Wolfy Feb 15 '11 at 7:44

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).

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.