I have a file with my Raspberry Pi address named
pi. It's in my home directory.
To connect to the Pi, I'd do this in my home directory:
. pi && ssh pi@$pi
It worked. Then I improved it with this script in my
#!/bin/bash . ~/pi ssh pi@$pi
Now I just do this:
Of course it works. But I sometimes need the Pi IP. Then I do this in my home dir:
But instead of sourcing the file, I'm getting connected to my Pi. To make things stranger,
$ . pi && echo ok pi@raspberrypi:~ $ logout Connection to 192.168.0.173 closed. ok
I get the same behaviour in all
sh. Could someone explain?