[comp.unix.ultrix] csh weirdness under Ultrix 3.0?

hudgens@fsu.scri.fsu.edu (Jim Hudgens) (04/08/90)

Anyone ever noticed this?  We're running Ultrix-32 V3.1B 
on a VAX.  The use of double quotes and back quotes seems to 
cause octal 377's to be interspersed with regular output.  
I seem to recall seeing this mentioned somewhere (perhaps in this 
newsgroup).  Anyone know why csh does this?  Neither bash nor 
sh seems to do this, nor does any other UNIX machine I have tried. 

csh> echo "$$" `date`
 2 4 9 8 6 Sat Apr 7 20:13:52 EDT 1990
csh> echo $$ `date`
24986 Sat Apr 7 20:17:50 EDT 1990
csh> echo "$$"
24986
csh> echo "$$" `date` | od -c
0000000  377   2 377   4 377   9 377   8 377   6       S   a   t       A
0000020    p   r       7       2   0   :   1   4   :   3   0       E   D
0000040    T       1   9   9   0  \n
0000047
csh> echo $$ `date` | od -c
0000000    2   4   9   8   6       S   a   t       A   p   r       7
0000020    2   0   :   1   7   :   0   4       E   D   T       1   9   9
0000040    0  \n
0000042

csh> cat << EoF > x
"$$" `date`
test
EoF
csh> od -c x
0000000    "   2   4   9   8   6   "     377   S 377   a 377   t 377
0000020  377   A 377   p 377   r 377     377     377   7 377     377   2
0000040  377   0 377   : 377   2 377   1 377   : 377   1 377   7 377
0000060  377   E 377   D 377   T 377     377   1 377   9 377   9 377   0
0000100   \n   t   e   s   t  \n
0000106


Just curious.

void *standard_disclaimer() { /* The above represent my personal views */ }
Jim Hudgens			Supercomputer Computations Research Institute
hudgens@vsserv.scri.fsu.edu	

grr@cbmvax.commodore.com (George Robbins) (04/08/90)

In article <642@fsu.scri.fsu.edu> hudgens@fsu.scri.fsu.edu (Jim Hudgens) writes:
> 
> Anyone ever noticed this?  We're running Ultrix-32 V3.1B 
> on a VAX.  The use of double quotes and back quotes seems to 
> cause octal 377's to be interspersed with regular output.  
> I seem to recall seeing this mentioned somewhere (perhaps in this 
> newsgroup).  Anyone know why csh does this?  Neither bash nor 
> sh seems to do this, nor does any other UNIX machine I have tried. 

This is a feature that DEC introduced in trying to make the shell 8-bit
transparent - they had to change the quoting mechanism from 8-th bit to
"escape" characters.

If you are running VAX stuff, use an either use /usr/new/csh or csh from one
of the older releases, I don't remember if 3.0 is ok, or you have to go back
to 2.2.

For RISC stuff, you need the version from the 3.1C mandatory patch tape.

-- 
George Robbins - now working for,     uucp:   {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing:   domain: grr@cbmvax.commodore.com
Commodore, Engineering Department     phone:  215-431-9349 (only by moonlite)

hans@umd5.umd.edu (Hans Breitenlohner) (04/14/90)

In article <642@fsu.scri.fsu.edu> hudgens@fsu.scri.fsu.edu (Jim Hudgens) 
>  describes some strange behavior of csh.

I have fixed most of those (all except the last one -- i'll have to take
another look at that) as well as related problems with Segmentation fault
and Illegal instruction when strings get long (> 512 chars or thereabouts).

If you have sources I can send you the fixes.  If not, I'm afraid I
can't help you.