Re: cd with multiple arguments?

2010-12-14 Thread Marc Herbert
Le 13/12/2010 19:48, Stephane CHAZELAS a écrit :
 Yes, they're called commands or programs or software.
 
 People tend to forget that before all a shell is a command line
 interpreter.
 
 If you're finding yourself writing complex shell functions that
 don't make use of external commands, then you're heading the
 wrong direction with your shell, or you are heading in one
 direction with the wrong medium (i.e. you need a programming
 language, not a shell).

Well put. I agree very much with this last paragraph, but the original
question was not about a complex shell function.

I should not have used the word library either. Let me say
convenience module instead.  Something like this for instance:
http://www.ukuug.org/events/linux2003/papers/bash_tips/

Ideally end users could download and enable Simon Myers module in
just a few commands. What we currently have instead is each Linux
distribution doing its little bit of fine-tuning, enabled for every
user by default, and painful to customize and override.





Re: cd with multiple arguments?

2010-12-14 Thread Chris F.A. Johnson

On Mon, 13 Dec 2010, Stephane CHAZELAS wrote:


2010-12-13, 12:04(+00), Marc Herbert:
[...]

True, bash does not come with a vast library of ready-to-use functions.


Neither is there any such reference library available externally. Or
is there?


Yes, they're called commands or programs or software.

People tend to forget that before all a shell is a command line
interpreter.

If you're finding yourself writing complex shell functions that
don't make use of external commands, then you're heading the
wrong direction with your shell, or you are heading in one
direction with the wrong medium (i.e. you need a programming
language, not a shell).


  I stongly disagree with that statement. The shell *is* a programming
  language, especially with the extensions in bash.

  In recent years I have stopped using any other language; the shell
  is more than adequate for all my programming needs.

--
   Chris F.A. Johnson, http://cfajohnson.com
   Author:
   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)