Subject: Re: HELP : some newbie questions
To: Fabiano Petrone <fabiano.petrone@bib.uniud.it>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 02/13/1998 09:01:25
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.

> 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.

> 3. last : I've tried to define simple shell variables like:
> 
> # lenght=80
> 
> but when I try something like
> 
> #echo $lenght
> 
> I can't obtain the result expected (80): why? I guess a kernel problem?

Which shell are you using? root on NetBSD uses csh by default. In csh, you
want to say

set length=80
or
set length = 80

Take care,

Bill