[OS:N:] bash intro for high school students?

Jay Scherrer jay at scherrer.com
Thu Jun 16 15:33:48 UTC 2005


Jeff,
I don't know why you are so adamant against Perl? There is no question
that in Unix the command line rules. But I was only pointing to the fact
that as you teach or show students a subject, Let's say shell scripting,
it might be a good idea to start at the beginning but also show how far
one can go. In your example you use "egrep -i "^it" < file | wc ", now
wouldn't it be great if you were to explain where "egrep" came from? And
what else "egrep" can do? You see shell scripting is nothing more then
grouping predefined functions together. This is what you need to get
across especially in this day of oop. I really don't want to get into a
script battle with you. But I see Perl as a successful accumulation of
all of these languages or utilities. On one hand you have head and tail
and on the other you have Perl.  

Jay Scherrer

On Thu, 2005-06-16 at 10:46 -0400, Jeff Kinz wrote:
> On Thu, Jun 16, 2005 at 07:34:22AM -0700, Jay Scherrer wrote:
> > On Thu, 2005-06-16 at 09:00 -0400, Jeff Kinz wrote:
> > > Perl (while wonderful) is not designed to be used interactively.
> > > You need one of the command shells for that.  One can try to use 
> > > Perl as a shell, but it quickly becomes apparent that the need to have
> > > everything be a complete program is much more awkward than the 
> > > "command line" mode of the shells
> > > 
> > This is not true. 
> 
> Yes it is.
> 
> > My respected instructor, Dr. Tim Maher will be publishing a great book
> > from Manning called "Minimal Perl" <http://manning.com/Maher> .
> > Minimal Perl is an attempt to show readers the effectiveness of what
> > Perl can do with as little as one line of code. 
> 
> Jay, while Perl one liners are wonderful things and can be very useful,
> they are not as "minimally useful" nor as easy to use nor as easy to
> understand as bash/sh command lines. (With all due respect to 
> Dr Maher, because Perl is truly wonderful, no question) 
> 
> For example, word count on a file: "wc file"
> 
> Perl, of course, can do this in one line as well.  
> 
> Is it as easy to understand?  No
> 
> Is it as easy to type?  No
> 
> Inside the Perl shell can you go back to that line and edit it to
> something more complex, like count how many lines begin with "it"
> something like this?:
> 
> egrep -i "^it" < file | wc 
> 
> No.
> 
> Perl is wonderful.  Perl one-liners are great, but Perl is not a shell.
> It lacks the features which make command shells the best place to use 
> *NIX from.
> 
> I challenge you to try to stop using your command shell.
> For one hour do everything from within Perl, or with only Perl
> one-liners, using none of the command shell features (like command line
> editing).  See if you feel like you have been more or less productive.
> 
> 
> 




More information about the open-source-now-list mailing list