Mail Archives: djgpp/2003/01/02/13:25:59
> Date: Thu, 02 Jan 2003 15:53:18 +0000
> From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
>
> $TMPDIR seems to have different slash directions, depending on which program I
> use:
>
> bash-2.04$ echo | awk "{ print ENVIRON[\"TMPDIR\"] }"
> c:\temp
> bash-2.04$ perl -e 'print $ENV{TMPDIR}."\n";'
> c:\temp
> bash-2.04$ sh -c 'echo $TMPDIR'
> c:/temp
TMPDIR should have forward slashes by virtue of DJGPP.ENV, unless
TMPDIR is already set outside the DJGPP program you run (gawk and
Bash in these cases).
> I suspect the programs are working as expected, but it's a bit confusing when
> you have, say, Perl and shell script programs interacting. I wonder if TMPDIR
> should be forward-slashified in awk & perl, like it is in bash.
Bash _must_ have TMPDIR forward-slashed, or else lots of scripts will
fall apart. I don't know about Perl, but I think you are right
assuming it should get the same treatment.
As for TEMP, I don't think Unix programs use it, so it could be left
at its backslashed form.
- Raw text -