Skip to content

[bug] printf with an unterminated %( format: GNU prints it literally with a warning (rc=0), rubash errors (rc=1) #1490

Closed

Description

@caomengxuan666

Environment: rubash master 31e2638, GNU bash 5.3.20 as oracle, Linux x86_64.

Repro:
printf 'F:%(\n' 0; echo rc=$?

GNU bash 5.3.20:
F:%( (printed literally)
warning: '\000': invalid time format specification
rc=0

rubash:
F:
printf: `%(\n': missing format character
rc=1

Distinct from #1284 (which strftime conversions are implemented);
this is the malformed-format shape itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions