Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!jarthur!dfoster From: dfoster@jarthur.Claremont.EDU (Derek R. Foster) Newsgroups: comp.unix.shell Subject: Csh setenv and `` don't like each other! Keywords: csh Message-ID: <11744@jarthur.Claremont.EDU> Date: 17 Apr 91 00:27:13 GMT Distribution: usa Organization: Harvey Mudd College, Claremont, CA 91711 Lines: 43 AAAAAAAAAAAAAAAAAAAUUUUUUUUUUUUUUGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHH!!!!!!!!!!! Consider the following: > alias test 'echo "Test OK"' <- Define an alias... > test <- It works correctly TEST OK > echo `test` <- Even in backquotes TEST OK > setenv A `test` <- But not after setenv. WHY? `test`: Ambiguous <- What on earth does "Ambiguous" mean here? <- (Why on earth do UNIX system programmers <- fear self-explanatory error messages so <- much?) > cat > testx <- make a file called testx echo "abc def" EOF >source testx <- it works as expected abc def > setenv A "`source ./testx`" <- even in the setenv with backquotes > printenv A abc def <- but for another file.... > echo "`source /hmc2/hmc_1993/dfoster/project2/host_supports`" jove vi tex msg <- it breaks, and the program is never run. > setenv A "`source /hmc2/hmc_1993/dfoster/project2/host_supports`" `source /hmc2/hmc_1993/dfoster/project2/host_supports`: Ambiguous. If anyone can shed some light on this behavior, I would be very happy. All I want to do is set an environment variable to the output of a shell script run via 'source', yet with every possible permutation I've tried with all kinds of combinations of ', `, ", and \ placed in interesting places, I have still consistently received the same bizarre results. WHY?????? Derek Riippa Foster