csh quoting weirdness under Ultrix 4.1

Jim Hudgens hudgens at sun13.SCRI.FSU.EDU
Thu Mar 7 07:06:57 AEST 1991



Someone here was showing me something I thought was fairly weird,
which pertains to Ultrix 4.1 on decstation 5000.  I think that it's
related to the older problem of Ultrix 3.1 csh, which involves (maybe
among other things) doubly quoted strings and backquoted strings on
the same command line:

(All this done in an emacs shell buffer).

----
vax-Ultrix3.1> set echo verbose
vax-Ultrix3.1> echo "foo" `date`
echo "foo" `date`
echo \377f\377o\377o `date`
date
\377f\377o\377o Wed Mar 6 15:27:44 EST 1991

----
On the DS5000, apparently this problem is fixed, though 
the following might make you wonder: 
---

decstation5000-Ultrix4.1> echo "foo" `date`
foo Wed Mar 6 15:28:28 EST 1991
decstation5000-Ultrix4.1> set echo verbose
decstation5000-Ultrix4.1> echo "foo" `date`
echo "foo" `date`
echo "foo" `date`
echo foo `date`
date
foo Wed Mar 6 15:24:15 EST 1991

---
Hmmm.

This is what a co-worker showed to me, that prompted 
all of this (and the above weirdness).  I'm not sure what 
to make of this, other than it looks like another manifestation
of the same sort of problem; the symptoms look similar, anyway.
---

decstation5000-Ultrix4.1> set echo verbose
decstation5000-Ultrix4.1> alias dif2 'diff `ls -t "\!*"*|head -2`'
alias dif2 'diff `ls -t "!*"*|head -2`' 
alias dif2 diff `ls -t "!*"*|head -2`
decstation5000-Ultrix4.1> dif2 foo
dif2 foo
dif2 foo 
No match.
head -2
diff
diff: two filename arguments required

----
The same alias works on a Sun, running 4.1.
----

sun4-sunos4.1> set echo verbose
sun4-sunos4.1> alias dif2 'diff `ls -t "\!*"*|head -2`'
alias dif2 'diff `ls -t "!*"*|head -2`'
alias dif2 diff `ls -t "!*"*|head -2`
sun4-sunos4.1> dif2 foo
dif2 foo
ls -t foo foo.1 foo.2 foo1 foo2
head -2
diff foo.2 foo.1
sun4-sunos4.1>

----

JHH
--

Jim Hudgens		Supercomputer Computations Research Institute
hudgens at sun13.scri.fsu.edu



More information about the Comp.unix.ultrix mailing list