Inside my .bashrc
, I'm doing a bunch of magic that causes problems when I'm trying to do an scp
. The solution I've been going with is to manually ssh to the target machine, disable my .bashrc
, do the copy, and then re-enable my .bashrc
. Is there a way to get around this?
Answer
My standard bashrc on debian had this as the first lines:
if [ -z "$PS1" ]; then
return
fi
This checks if the variable $PS1 is set (which only is set if you're on an interactive shell), and prevents the execution of the rest if it isn't.
No comments:
Post a Comment