Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

shells and bells

John Chambers wrote:
> Derek Martin wrote:
>          On Wed, 3 May 2000, Tewksbury, Chuck wrote:
>          > 1- should I use 'bash' or 'csh'?  A computer wiz friend once recommended
>          > csh.... not sure i notice the difference or what commands are available in
>          > csh that arent in bash
>          It's really a matter of preference, but if your goal is to learn system
>          administration, or if you want to write shell scripts, then I'd highly
>          recommend you choose bash.  It's mostly Bourne shell compatible and
>          largely korn shell compatible (though there are numerous ksh features
>          missing).
>          This is preferable because a) all boot scripts are written in bourne shell
>          (or bash on Linux systems) and bourne shell is a better scripting language
>          than C shell.  There are some things that you simply CAN'T do with C shell
>          that are quite trivial with bourne (and bash).
> Though if you are doing anything nontrivial, you  are  almost  always
> better off with perl, tcl or python as your "scripting" language. And
> perl in particular has become standard on just about all unix systems
> since it took over the Web.

I'd also mention expect.  Expect does something none of the
aforementioned scripting tools does - it lets you write scripts that
interact with other interactive programs.  For example, you could use
expect to establish a secure shell (ssh) connection to other machines,
then, I dunno, update user configuration information for /etc/passwd,
/etc/group, sendmail, samba, apache user authentication, etc.  All from
one remote location, all securely.

You can get other tools to let you do centralized administration, but if
you learn how to do this yourself, you won't be limited to what the
available tools let you do.

Of course, it's good for other things besides administration, too.  You
could use it to simplify ftp downloads, etc.

I'd recommend getting the book.  The expect web site
( doesn't offer up a lot of online
documentation.  They want you to buy the book.  Personally, I think
selling books is a good way for free software adherents to pay the rent
(also good motivation for hackers to write documentation).  Don't
begrudge them the right to make a buck, and go visit O'Reilly.

I'm not a big fan of tcl syntax (expect is based on tcl), but since this
is the only tool around that does what it does, it well worth a look

Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at (Subject line is ignored).

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /