Quantcast
Channel: Readlink not working over ssh - Super User
Viewing all articles
Browse latest Browse all 3

Answer by Lewis M for Readlink not working over ssh

$
0
0

Within the here document, your variables are being evaluated on the source side. If you want to have your variables be evaluated on the target side, escape the $. For example,

ssh -q $REMOTE -x << EOF    LINK="/path/to/my/link"    readlink \$LINK    TEST=\$(readlink -f "\$LINK")    echo \$TESTEOF

Hope this helps


Viewing all articles
Browse latest Browse all 3

Trending Articles