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

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



On Sun, Jun 12, 2022 at 07:57:40AM -0400, rhkramer@gmail.com wrote:
> 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)?

Formal definitions:

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_03

Rationale:

https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_06_03

See also:

https://mywiki.wooledge.org/BashFAQ/082


Reply to: