Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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"

or

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

Depending on what's making the error.

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

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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