|
Bugzilla – Full Text Bug Listing |
| Summary: | bash $'foo' quoting bug | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE Linux 10.1 | Reporter: | Andreas Gruenbacher <agruen> |
| Component: | Basesystem | Assignee: | Dr. Werner Fink <werner> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Critical | ||
| Priority: | P5 - None | CC: | forgotten_OS1JNCFbCX |
| Version: | Alpha 4 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | For reference, this is the fix | ||
|
Description
Andreas Gruenbacher
2006-01-04 14:51:31 UTC
Hmmm ... AFAIS from the source code this is a weanted feature.
Beside this
echo "$(set -- $"a b"; echo $#)"
returns 1 instead of 2.
$"text" is a string that is passed through gettext, while $'text' is a string that gets C-style escapes like \t expanded. I cannot imagine that it's intended that $'...' behaves differently in different contexts: $ set -- $'a\tb' $ echo $# "$@" 1 a<tab>b $ echo $(set -- $'a\tb'; echo $# "$@") 1 a b $ echo $(set -- $'a\tb'; echo $# "$@") 2 a b The first two cases are correct, the last one isn't. Oops, the last case should have been: $ echo "$(set -- $'a\tb'; echo $# "$@")" 2 a b I thought so :) ... nad have have a single line patch to fix this. fixed *** Bug 143272 has been marked as a duplicate of this bug. *** Created attachment 67684 [details]
For reference, this is the fix
Werner, did you send this upstream?
done This is an autogenerated message for OBS integration: This bug (141394) was mentioned in https://build.opensuse.org/request/show/112694 Factory / bash |