OT: broken/useless ansi - console driver??

Bill Campbell bill at celestial.com
Mon Oct 24 18:53:55 PDT 2005


On Mon, Oct 24, 2005, Bob Stockler wrote:
>Ken Brody wrote (on Mon, Oct 24, 2005 at 07:36:21PM -0400):
>
>| Quoting Bob Stockler (Mon, 24 Oct 2005 17:33:32 -0400):
>| [...]
>| > | Now, if only system() would run /bin/sh rather than the incompatible
>| > | /u95/bin/sh instead.  (Regardless of the SHELL setting.)
>| >
>| > Why?  What's incompatible about it?  It's the latest version of
>| > the REAL KornShell (ksh93) and is (mostly) backwards commpatible
>| > with the Bourne shell when doing what the Bourne shell would do.
>
>Sorta Top Posting because I don't understand what follows . . .
>
>As I understand the SYSTEM command in filePro, on UNIX-like systems
>it invokes /bin/sh to execute what is passed to it.
>
>On Linux systems /bin/sh might be anything.  How do you handle that?

I would be very surprised if the Linux /bin/sh were anything but a linke to
the current version of bash (of course we have some ancient systems where
that version of bash predates bash2 :-).

The way you handle it is to start scripts with the appropriate ``hash
bang'' (e.g. #!/bin/ksh) to invoke the command interpreter you need if your
scripts take advantage of a particular shell's ``enhancements'' or quirks.

One of the most important things I learned almost 40 years ago is that when
writing programs in whatever language, it's best to avoid vendor-specific
features that can cause problems on other systems (e.g. FORTRAN compilers
that allowed variable names with more than six characters).

>>From filePro Menu Action Command Lines I've tested (on OSR5):
>
>  ++
>  +PERL+
>  +AWK+
>  +SHELL+
>
>and they all work as expected (no matter what SHELL in the envionment).

Perl has its own issues when dealing with a heterogeous mix of machines,
mostly which CPAN modules are installed, and what versions are available.
This is one of the major reasons we standardized on the OpenPKG.org
portable packaging system several years ago as it allows to have a uniform
environment across all the platforms we support without regard to the
underlying vendor's implementation.

Bill
--
INTERNET:   bill at Celestial.COM  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

Marijuana will be legal some day, because the many law students
who now smoke pot will someday become congressmen and legalize
it in order to protect themselves.
		-- Lenny Bruce


More information about the Filepro-list mailing list