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

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



On Saturday, June 11, 2022 10:25:34 AM Greg Wooledge wrote:
> On Sat, Jun 11, 2022 at 09:54:17AM -0400, rhkramer@gmail.com wrote:
> > eval `ssh-agent`

> 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)"

I am curious about the origin of the more modern syntax -- was it driven (or 
partially driven) by the possiblity of (a human) confusing the backticks for 
single quotes (like I did)?


> 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: