[Fwd: Re: [SLUG] arrays]

Stephen O'Neill soneill84 at yahoo.co.uk
Wed Nov 30 22:41:43 GMT 2005


Martin Webb wrote:

> You ask if my script is "young".  What does that mean?  It's about
> three days old, and hasn't yet had a birthday - I think I started it
> on Sunday.

Hehe. What I was thinking here is that if it was relatively new then it
may have been easy to convert it to a different scripting engine.

Scripts that have evolved over months/years can be a nightmare to rewrite.

> What is sh/

A type of 'shell' - bash is a 'shell' scripting engine; so is ksh, csh,
sh etc.

I suggested 'sh' as I think it has a slightlier easier syntax - iirc!

> perl?  

Perl is more than just a shell scripting language, it's a full
programming language. However it's not fully compiled like C, so is
still regarded as a scripting language.

It does have a really complicated syntax at times - with lots of
'special variables'; however it's extremely powerful. E.g. to get your
file into a line by line array you would just do something like:

open(FILE_HANDLE, $path) || die('No dice grandma');
my @file_array = <FILE_HANDLE>;

To appease other list lurkers I should also mention more recent
scripting languages such as python and ruby which offer a rich syntax
with an object oriented approach. And for that matter you can even use PHP.

> Can I suggest a future meeting include some workshop time, run by one
> or two of us who are good at scripting, so non-experts like me can be
> improved and have chance to ask questions.

I think that we could all learn from each other on this one - I'm better
at perl than shell scripting, I suspect that anyone with 3 days old
shell scripts knows more shell than I do. Dave's our Ruby man and
there's bound to be a perl expert amongst us - every good Linux group
should have one!

I'd also be happy to continue this over email.

> Woja think?

Yeah, good idea - we should bring pillows for those that won't be
getting off on such adventures though!

Steve O

		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com




More information about the Scarborough mailing list