[Glastonbury] Questions

Andrew M.A. Cater glastonbury at mailman.lug.org.uk
Thu Jul 17 08:20:06 2003


On Thu, Jul 17, 2003 at 06:43:59AM -0000, Sean Miller wrote:
> 
> O'Reilly have a fantastic little book called "UNIX In a Nutshell" which I
> appear to have lost ;-( so can't lend... but it's well worth having if you
> are considering UNIX/Linux shell programming.
There is also a Linux in a Nutshell - the UNIX in a Nutshell came in two
versions and is fairly old but gives good coverage of Solaris, for 
example.  I'd recommend the Linux Nutshell book and also Running Linux
from O'Reilly
> 
> There are some, however, who would advise you to steer well clear of shell
> scripting and use perl instead. The advantage of perl is that it is a
> platform-independent language, therefore your syntax for scripts on
> windows, linux, unix, macos and whatever else will be identical, not to
> mention CGI if you're installing (or writing) web applications in Perl.
> There is logic in that, and you may wish to consider this as sensible
> advice.
Perl is _not_ platform independent on anything other than Unices/Linux.
The Perl port to Windows 32 bit by Active State is specifically not
supported by Larry Wall and co. for example.  Because Windows / MacOS 
do things differently, you can't rely on being able to use Perl to the
same extent.

The basics, however, are similar.  The problem comes when you want
to use CPAN stuff and find it plain won't work on your platform.

If you've not programmed before, Perl can be scary whereas basic shell
scripts are potentially conceptually easy. 

#/bin/sh
date ; time ; w

takes not much to explain and from there you might do a 

ps -elf | grep $USER and so on ...	

and you need shell script reading ability to understand what init
scripts and so on are actually trying to do, anyway.

Just my inherent biases showing :)

HTH,

Andy