Using Linux and bash:
in remote .bashrc file I've export FOO="hello"
locally I run this command but none variable was showed
ssh user1@192.168.1.114 ". /home/user1/.bashrc && echo \$FOO"
How could I get remote FOO variable?
Using Linux and bash:
in remote .bashrc file I've export FOO="hello"
locally I run this command but none variable was showed
ssh user1@192.168.1.114 ". /home/user1/.bashrc && echo \$FOO"
How could I get remote FOO variable?
I suggest with bash:
source <(ssh user1@192.168.1.114 cat /home/user1/.bashrc)
declare -p FOO
Output:
declare -x FOO="hello"
I assume /home/user1/.bashrc contains export FOO="hello".