Bug 5338
| Summary: | tcsh && is not short circuiting | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | jfoster |
| Component: | tcsh | Assignee: | Nalin Dahyabhai <nalin> |
| Status: | CLOSED NOTABUG | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.0 | CC: | goeran |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2002-03-25 05:38:22 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
jfoster
1999-09-23 20:26:07 UTC
This bug is still present in tcsh-6.09-1. This is not a bug, is it? Variable expansion takes place in one step for a
complete line, before any evaluation of the expression or execution of command.
As far as I'm aware, it has always been necessary to do
if ($?X11) then
if ($X11 == "huh?") then
echo "a"
endif
endif
to achieve the desired effect. Both in tcsh and in the original csh.
OK, it's a feature then. The reported behavior is surprising but correct. Read "Csh Programming Considered Harmful", section 6 (Expression Evaluation). <http://www.perl.com/pub/a/language/versus/csh.html> |