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

Re: Resolved: Re: OT: Bash: what is eval doing here?



On Sat, Jun 11, 2022 at 09:54:17AM -0400, rhkramer@gmail.com wrote:
> eval `ssh-agent`

> Then, in accordance with my vague recollection of what I think of as Greg 
> Woolidge's typical advice (which I (may mis-)remember as "always quote"), I 
> thought the backticks (that I incorrectly saw as single quotes) were just the 
> "proper" way to specify a command to be eval'ed.  

For the record, the command you've got here is written in a very
antiquated way.  A better (as well as more modern) way to write it
would be:

eval "$(ssh-agent)"

The lack of outer double quotes in the antiquated command would normally
cause it to fail, but ssh-agent writes some redundant semicolons, so
that the unquoted legacy command still works.


Reply to: