RE: [bitbake-devel] [scarthgap][PATCH] bitbake: bitbake-user-manual-metadata: fix missing option to 'echo' command in example

Peter Kjellerstedt <[email protected]> Tue, 2 Jun 2026 19:03:15 +0000
Newsgroups org.openembedded.lists.bitbake-devel
Message-ID <DB5PR02MB102135B79F318C5FC1017E768EF122@DB5PR02MB10213.eurprd02.prod.outlook.com>
> -----Original Message-----
> From: [email protected] <[email protected]> On Behalf Of Robin Lintermann via lists.openembedded.org
> Sent: den 2 juni 2026 16:29
> To: [email protected]
> Cc: Robin Lintermann <[email protected]>
> Subject: [bitbake-devel] [scarthgap][PATCH] bitbake: bitbake-user-manual-metadata: fix missing option to 'echo' command in example
> 
> The original text reads:
> | values. For these to have an effect, the value must be passed to some
> | utility that interprets escape sequences, such as
> | ``printf`` or ``echo -n``.

Umm, yes that's shown by git diff...

> 
> The '-n' option tells echo to not append a newline to the output.
> What's missing here is the '-e' option to "enable interpretation of
> backslash escapes".
> 
> Signed-off-by: Robin Lintermann <[email protected]>
> ---
>  doc/bitbake-user-manual/bitbake-user-manual-metadata.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
> index 58975f4c8..3d32e8c1e 100644
> --- a/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
> +++ b/doc/bitbake-user-manual/bitbake-user-manual-metadata.rst
> @@ -128,7 +128,7 @@ Consider this additional example where the two assignments both assign
>     BitBake does not interpret escape sequences like "\\n" in variable
>     values. For these to have an effect, the value must be passed to some
>     utility that interprets escape sequences, such as
> -   ``printf`` or ``echo -n``.
> +   ``printf`` or ``echo -ne``.

I would rather recommend to drop the suggestion to use `echo` as 
how it handles escape sequences is shell specific, where Bash, Zsh, 
and Dash all behave differently...

> 
>  Variable Expansion
>  ------------------
> --
> 2.43.0

//Peter