Porting UNIX Applications to the Mac

David Shayer das at well.UUCP
Sat Sep 27 18:22:02 AEST 1986


After listening to the Unix-Mac portability debate, I have
another thought about Mac compatibility with Unix.  Sure the Mac
ought to run C programs from Unix environments.  But what about running
Unix shell scripts?  I have been using MPW (Mac Programmers Workshop)
lately, and it has a Unix-like command language, but it has many
frustrating minor differences.

Obviously (to me anyway) we don't want to just run Unix shell scripts
at the Finder level.  After all, the whole idea of the Mac is to get away
from the user having to do that kind of stuff.  Unix may be very powerful,
and we all like it (or at least use it), but a lot of people bought
Macs specifically so they don't have to put up with commands like
grep -v foo > bar.  

But at the programmers level, it is certainly useful to have Unix-like 
capabilities.  MPW does provide most of the same types of commands as
Unix, if you've been waiting for a Unix-like development environment
on the Mac, check out MPW.  However, most of the commands have different
names and different formats.  Since most of the same commands and
utilities exist, it would be nice if they had the same name.  MPW
is too Unix-like for Apple not to have realized they were mostly
duplicating Unix.  But it would be nice if they had gone all the way,
so you could download a shell archive and compile it directly on
your Mac, or download a Unix program and its makefile and make it
in one step.

Instead, MPW has a lot of little changes.  For instance, the wildcard
characters are not ? and *, but ? and command-x.  Make files use
command-f instead of : to note dependencies.  The whole command
language is full of specialized Mac-keyboard-only characters.

I have a proposal.  A program (in C, or a Unix or MPW shell script)
to convert Unix shell scripts to MPW shell scripts and vice versa,
informing you of commands that cannot be converted (there are few).
I must admit that I don't know Unix shell language well enough
(or MPW shell language either, its pretty complicated).  But if
I inspire somebody, please post a copy.


-----------------------
David Shayer @ The Well
well!das

"Most of the time, for most programmers, what a compiler produces 
is not object code but error messages."  



More information about the Comp.unix mailing list