Ticket #35952

parameter expansion and quoting

Open Date: 2016-01-21 08:55 Last Update: 2016-01-22 18:08

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
None
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Details

with a posix shell:

$ sh -c 'putc="printf \\"; ${putc}100'
@

but with yash:

$ yash -c 'putc="printf \\"; ${putc}100'
100

a workaround exist:

$ yash -c 'putc="printf \\\\"; ${putc}100'
@

but it breaks on other shells (it prints \100)

I'm using the version 2.36-1 included in Debian GNU/Linux 8 (jessie)

I discovered this bug developing a small shell library, where you can find an use case in the n_bytes_encode function of the lib/bytes.sh file included in http://www.trek.eu.org/devel/naive/naive-0.0.2.tar.gz

Ticket History (3/3 Histories)

2016-01-21 08:55 Updated by: trek00
  • New Ticket "parameter expansion and quoting" created
2016-01-21 21:41 Updated by: magicant
  • Resolution Update from None to Fixed
  • Status Update from Open to Closed
  • Ticket Close date is changed to 2016-01-21 21:41
Comment

Thank you for the bug report, but I believe this bug has been fixed since version 2.38. Please try upgrading. If you think the bug is still unfixed in the latest version, which is 2.40, please reopen the bug report. Thanks!

2016-01-22 18:08 Updated by: trek00
Comment

Thanks, I downloaded the 2.39 version and it is ok!

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login