Bug 435421 - '\' can not be used to quote all delimiters.
'\' can not be used to quote all delimiters.
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: tcsh (Show other bugs)
5.1
i686 Linux
low Severity low
: rc
: ---
Assigned To: Vitezslav Crhonek
Bill Huang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-29 03:26 EST by Cai Xianchao
Modified: 2008-04-23 05:28 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-23 05:28:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
This is a patch fixing the bug. (725 bytes, application/octet-stream)
2008-02-29 03:26 EST, Cai Xianchao
no flags Details

  None (edit)
Description Cai Xianchao 2008-02-29 03:26:02 EST
Description of problem:

Version-Release number of selected component (if applicable):
Manpage says that "a‘\’ can be used to quote the delimiter inside l and r." But,
'\' can not be used to quote the delimiter '(', ')', '|' and '>'.

How reproducible:


Steps to Reproduce:
1.[test@RHEL5 ~]$ set test=(ab cd)
2.[test@RHEL5 ~]$ echo $test:s(\(a(A(
Too many ('s.
3.[test@RHEL5 ~]$ echo $test:s)\)a)A)
Too many )'s.
4.[test@RHEL5 ~]$ echo $test:s|\|a|A|
Invalid null command.
5.[test@RHEL5 ~]$ echo $test:s>\>a>A>
Missing name for redirect.
  
Actual results:
The substitution fails and error messages are outputed.

Expected results:
'a' is replaced by 'A'.

Additional info:
Comment 1 Cai Xianchao 2008-02-29 03:26:02 EST
Created attachment 296314 [details]
This is a patch fixing the bug.
Comment 2 Vitezslav Crhonek 2008-02-29 07:53:08 EST
Thanks for report and patch!
Fixed in Fedora rawhide.
Comment 3 Vitezslav Crhonek 2008-04-23 05:28:35 EDT
I've reopened the bug.

1.[test@RHEL5 ~]$ set test=(ab cd)
Fine. But note:
[vcrhonek@norcus ~]$ echo $test
ab cd
Braces are not part of variable, they are used because variable contains white
space.
set  var = (str1 str2 str3) define shell variable with value consisting of
multiple strings.

2.[test@RHEL5 ~]$ echo $test:s(\(a(A(
Wrong. There's no "(a" to be replaced with "A".
[vcrhonek@norcus ~]$ echo $test:s(a(A(
Ab cd

3.[test@RHEL5 ~]$ echo $test:s)\)a)A)
Wrong. There's no ")a" to be replaced with "A".
[vcrhonek@norcus ~]$ echo $test:s)a)A)
Ab cd

4.[test@RHEL5 ~]$ echo $test:s|\|a|A|
Wrong. There's no "|a" to be replaced with "A".
[vcrhonek@norcus ~]$ echo $test:s|a|A|
Ab cd

5.[test@RHEL5 ~]$ echo $test:s>\>a>A>
Missing name for redirect.
Wrong. There's no ">a" to be replaced with "A".
[vcrhonek@norcus ~]$ echo $test:s>a>A>
Ab cd

Note this:
[vcrhonek@norcus ~]$ set test = ( ab\> cd )
[vcrhonek@norcus ~]$ !:s(\((X(:p
set test = X ab\> cd )

[vcrhonek@norcus ~]$ set test = ( ab > cd )
[vcrhonek@norcus ~]$ !:s>\>>X>:p
set test = ( ab X cd )

So everything works correctly, changing resolution to NOTABUG and man page will
be fixed back in Fedora.

Note You need to log in before you can comment on or make changes to this bug.