- Red Hat Enterprise Linux 5
- Behaviour on Red Hat Enterprise Linux 4 using csh (RPM: tcsh-6.13-10.el4)
# echo '\this is a test' \this is a test
- Behaviour on RHEL 5 using csh (RPM: tcsh-6.14-17.el5.x86_64)
#echo '\this is a test' his is a test
- The string in single quotes should not interpret backslash and the csh in RHEL5 behaviour seems like a bug.
- Set "echo_style=bsd" fixes the problem in RHEL-5
~]$ echo '\test' est ~]$ set echo_style=bsd ~]$ echo '\test' \test
- The default
echo_stylesetting is being auto-detected at compile time and depends on the machine architecture (macros defined in standard headers) which have been changed between RHEL-4 and RHEL-5 releases. The default setting can be easily overridden by setting the
echo_stylein one of the startup sourced scripts.
The difference is in the default setting of the
echo_stylevariable which controls the way the echo treats the escape sequences (see
# man cshfor details)
~]$ echo $echo_style bsd
- On RHEL-5
~]$ echo $echo_style both
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.