My simple file scp from a remote host (actually a locally run VM but that shouldn't matter) failed without displaying any error message but clearly not having copied the desired file:
scp myuser@myhost:~/.bashrc ~/.bashrc.ubuntu
The only thing it displayed was
================================================================================
I thought that was peculiar because that was the first line displayed in my login greeting on the remote, which looks like:
================================================================================
Welcome to <Ubuntu 12.04.2 LTS>
You are <myuser> logged into <hostname> (my_ipaddress)
Today is <Wed Aug 28 16:48:49 EDT 2013>
================================================================================
And here are the contents of the .bashrc on the remote that define that greeting:
1 if [ -f ~/.bash_aliases ]; then
2 . ~/.bash_aliases
3 fi
4
5
6 export PS1='\w@\t>'
7
8 set -o vi
9
10 printf %80s |tr " " "="
11 echo
12
13 echo "Welcome to <"`lsb_release -d | sed 's/Description\:\s*//'`">"
14
15 export IPADDR=`hostname -I`
16
17 echo "You are <"$LOGNAME"> logged into <"$HOSTNAME"> ("$IPADDR")"
18
19 echo "Today is <"`date`">"
20
21
22 printf %80s |tr " " "="
23 echo
Once I removed everything from like 9 down on the remote .bashrc, the scp succeeded.
Can anyone expound on this peculiar occurrence? The local host is Mac OS Mountain Lion and the remote (VM) is Ubuntu 12.04.
[ -z "$PS1" ], it doesn't reliably test for an interactive shell. – Gilles 'SO- stop being evil' Aug 28 '13 at 22:15