Skip to content

echo: Argument is treated as multiple arguments #1873

@DoBi

Description

@DoBi

I just found out, that there is a different behaviour between the C-coreutils echo and the Rust version.

This command leads to an error, while working with the C version:

echo '"\n'CXXFLAGS=-g -O2'\n"'

It leads to this output:

echo '"\n'CXXFLAGS=-g -O2'\n"'
echo: error: Unrecognized option: 'O'

The expected output is:

echo '"\n'CXXFLAGS=-g -O2'\n"'
"\nCXXFLAGS=-g -O2\n"

It seems like the argument is somehow parsed wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions