Re: [PATCH v2 5/7] config: plumb --fixed-value into config API
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Nov 25, 2020, 17:55 UTC
- Message-ID
- <CAPig+cQ+GPUoddGXP47bJVMLCdpozoC752M6bmc=jpmhe33J8g@mail.gmail.com>
- In-Reply-To
- <d18a2f7f-67e9-05eb-95d1-ce0b4bd0b187@gmail.com>
On Wed, Nov 25, 2020 at 10:49 AM Derrick Stolee <stolee@gmail.com> wrote:
Show 11 quoted lines
> On 11/23/2020 5:21 PM, Emily Shaffer wrote: > > On Mon, Nov 23, 2020 at 04:05:05PM +0000, Derrick Stolee via GitGitGadget wrote: > >> + printf "fixed.test=bogus\n" >expect && > > It is jarring to me to see a printf here when everywhere else we use > > heredocs. 'git grep' tells me it's not unheard of, but it looks like > > those are cases where the whole file doesn't use heredocs. > > I can use a heredoc just to be consistent. > > (To also respond to Eric's message, I tend to use printf instead > of echo because echo starts a process while printf does not.)
`echo` is a builtin[1] in many or most shells (just as `printf` also often is), thus is unlikely to start a process.
[1] Aside: You can use `type <cmd>` or `command -V <cmd>` to see if <cmd> is a builtin in your shell.