csh pleasures -- extensive bug list available

csh pleasures -- extensive bug list available

Post by Matt D » Wed, 13 Feb 1991 05:28:52




Quote:>A compressed list of C Shell bugs (including the famous "if(" bug) is
>available by anonymous FTP from this site as CSHbugs.Z.  I made this list
>for 4.2BSD csh years ago; most of the bugs still apply to 4.3BSD csh and
>all the other C Shells out there.  Not a pretty sight.

For the record, most of them have been fixed in the latest version of
the tcsh.
--

 
 
 

1. csh pleasures


:Question: what does the following c-shell script print out?
:Anybody care defending?
:
:       #!/bin/csh -f
:       set a=0
:       set b=1
:       if($a) then
:               if($b) then
:                       echo one
:               else
:                       echo two
:               endif
:       else
:               echo three
:       endif

On my system it prints out "three", because we fixed it.  On many
systems, it prints out "two".  The reason is that the csh misparses
"if(".  The only defense is for to stop people from writing ugly code
with parens next to their if's and while's.  More seriously, there
is no defense for the csh.  Just say no.  Trust me -- you'll be glad
you did so in the long run.

--tom
--
"Still waiting to read alt.fan.dan-bernstein using DBWM, Dan's own AI window
manager, which argues with you for 10 weeks before resizing your window."
### And now for the question of the month:  How do you spell relief?   Answer:

2. How to set Secure RPC domain in Solaris 2.6 +?

3. problem with startx on 2.2.9

4. An extensive comparison of 'sh' and 'csh' language features

5. How to use thread in UNIX C

6. Extensive UNIX skill set available...

7. Apache & log rotation

8. Need list of csh bugs which was advertised on the net some time back

9. List of csh nested if bugs

10. Development kernels - list of known bugs available?

11. 4.2BSD C Shell Bug List available -- many apply to current C Shells

12. Irix 5.2 Bug List\Hole List