[tex-live] Runtime limitations on open files?

David Kastrup dak at gnu.org
Sat Aug 18 11:48:29 CEST 2007


Philip TAYLOR <Philip-and-LeKhanh at Royal-Tunbridge-Wells.Org> writes:

> Reinhard Kotucha wrote:
>
>> Phil, I respect you because I know that you are an TeX expert.  You
>> usually know what you are talking about and you are certainly more
>> familiar with TeX than anybody else.  But what you said about UNIX is
>> pure crap and I must admit that I'm quite disappointed.
>
> Well, it was intentionally provocative, but that doesn't
> mean it's not grounded in truth : if you read back over
> the TeX live correspondence (which is the list to which
> I was referring, rather than PdfTeX or NTGTeX or whatever)
> you will see over and over again questions caused by different
> libraries, different compilers, different versions, different
> modes of linking, etc., etc., etc.  Every time I read one,
> I ask myself "Why on earth do they bother ?".

Because they can.  So they are more noticeable than the two people who
had actually managed to get it compiled under Windows.

The autoconf documentation contains a section about portable shell
programming: what kind of stuff you can rely on to work everywhere,
and what not.

It is a real horror show and a bit of a nuisance to keep everything in
mind.  The resulting scripts sometimes are a bit awkward.

But this does not hold a candle to programming cmd.exe.  Something
like

for i in /opt /usr/local /opt/* /usr/local/*
do
  if test -d "$i"/software
  then
    cd "$i"
    subdir="$i"
    break
  fi
done

becomes (in a batch file, on the command line it looks different)

for /D %%I in (C:\ D:\ C:\* D:\*) do (
  if exist %%I\software\NUL (
    %%~dI
    cd %%~pnI
    set subdir=%%I
    goto found
  )
)
:found

Except that it probably won't work when you are in a subdirectory of
C: or D: currently.  And passing the found string into Java with
"%subdir%" can cause the trailing quote to be added (because it may be
backslash-preceded) into the command line argument.

And if you use "echo on" in your batch file (the default), what gets
echoed back at you is garbage, because Windows does not manage to
treat the %%x stuff correctly when echoing.

It is _much_ _much_ harder to find the necessary information for batch
programming under Windows on the net, and while portability is not
much of a concern, the portable subset of shell programming is still
much more straightforward and usable than what cmd.exe provides.

Have you actually programmed any serious batch scripts under Windows?
Or are your opinions not based on working with the system?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


More information about the tex-live mailing list