Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

SOLVED! ( "here" document broken? (New findings))



Thank you for all the attention to my problem. I finally was able to
track
down the fault. 

First I should explain my last message, why suddenly "here" documents
even did
not work with zsh -f. How blind can a man be!!!! You see: For technical
reason,
I use several interactive shells in different windows - zsh, bash and
tcsh.
I did not care from which shell I invoked my zsh scripts, because I
thought this
were not important - after all, the shell script has a #! line and hence
should
not care from which shell it was executed.

I was wrong. I found that the "here" testscripts do not run when called
from an
interactive zsh, but run well when called from interactive bash or tcsh,
and this
was irrespective of flags such as -f. This means the culprit must be in
the 
environment (which is of course inherited by zsh). 

There is exactly one setting in my invironment which is different from
an interactive
zsh to that of my bash and tcsh environments, and this is the line

  export TMPPREFIX=/tmp/zsh_temporaries/file

Even when I call a script with #!/bin/zsh -f, it sees the TMPPREFIX
environment variable,
which happens to be set whenever I am invoking that script from an
interactive zsh.
When the zsh Script was called from an interactive bash or tcsh,
TMPPREFIX happened
to be undefined.

My mistake was to assume that the directory mentioned in TMPPREFIX would
be created
by zsh automatically, but this is not the case (and the manual does not
claim it either
anyway, so this is clearly my fault). I have changed the line to

  export TMPPREFIX=/tmp/zsh_temporary_file

and now everything runs well.

Thank you for all of you helping, and sorry that I put you on the wrong
track.....

Ronald



Messages sorted by: Reverse Date, Date, Thread, Author