Subject: Re: HELP : some newbie questions
To: Bill Studenmund <wrstuden@loki.stanford.edu>
From: Colin Wood <cwood@ichips.intel.com>
List: port-mac68k
Date: 02/13/1998 09:54:27
Bill Studenmund wrote:
> On Mon, 9 Feb 1998, Fabiano Petrone wrote:
> 
> > Hi to everybody.
> > Before all, excuse the cross-posting to 2 lists (netbds-help and netbsd-mac)
> > I've 3 questions : I hope not FAQ ones...
> > I've mounted NetBSD 1.3 on my 68k macintosh LC 630 (with the generic
> > kernel) and I'm following the Kochan's book "exploring the UNIX system" as
> > an introductory guide to the unix word.
> > here are the 3 questions. In all the examples I've logged as "root":
> > 
> > 1. I've tried a simple pipe like "who | wc -l" and it works OK. I've saved
> > this pipe in a file on /root/pub (call it "file") and I've chmoded it as
> > executable with "chmod +x file".
> > well, the problem is that when I call "file" from the prompt #, the system
> > respond "file : not such command" : why?
> 
> The top line of a shell script (your command) needs to be "#! /bin/sh". 
> Actually, it can be /bin/csh or /bin/tcsh or /bin/ksh as you wish (or even
> #! /usr/local/bin/perl for a perl script). But you have to stick the
> command which runs the script in the top line. You didn't do that, so the
> system's confused.

Actually, the error he's getting in this case is a result of not having
/root/pub in his path.  I believe that Unix systems are defined to use
/bin/sh as the interpreter for executables which they cannot figure out a
magic number.  At least, it certainly works that way on my AIX machine
here at work.

So, in this case, you need to either add /root/pub to your path (which is
probably a little silly), or more simply, specify the path when you call
the executable, i.e.:

/root/pub/file

should work just fine.
 
> > 2. I've FTP'ed the Unix perl package and I'd like to install it on NetBSD.
> > is it possible? where can  I find the instructions to do so? is this
> > "enterprise" something that also a newbie like me can do?
> 
> I'm not sure, but there should be a README that came with the perl
> package. Check it out. I'd hope it compiles right out of the box.

You might also want to take a look at the NetBSD packages system.
Documentation for it is available on www.netbsd.org.  The packages system
is a more or less easy way to go about compiling and installing various
popular packages under NetBSD.  Keep in mind that you will need to have
installed the comp.tgz distribution set in order to compile anything.

I hope this helps.

Later.

-- 
Colin Wood                                 cwood@ichips.intel.com
Component Design Engineer - MD6                 Intel Corporation
-----------------------------------------------------------------
I speak only on my own behalf, not for my employer.