[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

OT: Bash: what is eval doing here?



In my (seemingly unending) quest to understand ssh, I've come across a 
document that calls for running =eval 'ssh-agent'= from a command line.

I wondered why, as I thought I would get the same result from just running 
=ssh-agent=, but the results are different -- see below:

$ eval `ssh-agent`
Agent pid 23929

$ ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-uLqQ9VWX0RL7/agent.23932; export SSH_AUTH_SOCK;
SSH_AGENT_PID=23933; export SSH_AGENT_PID;
echo Agent pid 23933;

Can anybody on here explain what is going on / why?


Reply to: