From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078611110448.tru64-unix-managers.marc@archive.invalid> From: David Bremer Date: Wed, 16 Apr 1997 06:02:39 +0000 To: tru64-unix-managers Subject: SUMMARY: Shell efficiency X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078611110448 Thanks for all the replies. My original query followed discussions here about the merits of csh & ksh. We've been using ksh but we are installing a system where the vendors use csh - I was mostly interested in whether there was any 'efficiency' differences between them i.e. are some things BETTER done in csh - even if they are 'easier' to do in ksh. Most of the replies mentioned that things basically boil down to personal preference - some likening the preference to religious bigotry! Richard Jackson did remind me to try the time(1) command to compare equivalent scripts (which I haven't done yet) The general opinion is that korn is much better for scripts that C-shell and seemed to be the most preferred by those who replied - a few preferred csh for interactive use - even though preferring ksh for scripts - and there were a few adherents to the more modern ones such as tcsh, bash & perl for scripts (BTW I have read quite a good article about why everything should be in bourne due to transportability - but it sounded masochistic to me!) Other replies were: ---------------------------------------------- Gilles -- casavecchi_g@decus.fr As far as I know ksh has some enhacements compared to csh when talking about programming: o a little bit faster in loops - especially when using integer control loop statements o POSIX complient (or quite) which is mandatory feature on some projects - for example European Community ones o ksh executable supports native Bourne scripts o now login shell for many plateforms even for root, very interesting for multi-unix sites where to standardize o login and loading configuration files separated and sequenced in the 'good' order: login first (.profile), loading second ($ENV), and parameterizable loading configuratoin file ($ENV) allowing multiple indirections for file names via variable expansions o powerfull string manipulation statements o variable typecasting o clear trace mode o ... Its main restrictions : o not close to C code: prohibitive intellectual cost for most developpers o not well implemented on old plateforms (SunOS, ...) About implementation problems on DU : I found about the same number of bugs and problems while upgrading from on major DU version onto another (some echoes about such csh problems have been discussed herein alpha-osf-manager). I found no solution other than to recopy onto DU 4 machines csh and ksh from DU 3.2G until DEC corrects problems we met so we can still use old ksh/csh scripts we written in former DU releases. ---------------------------------------------- Mikel Stous stous@sol.cstp.umkc.edu <> I always heard that the Bourne/Korn shells were better for scripts than the csh. I understood that the csh was a better interactive shell. As for my preferance, I like the modernly developed shells over the classic shells. sh (Bourne shell) -> bash ( Bourne again shell) ksh ( Korn shell ) -> zsh ( Z shell ) csh ( C shell ) -> tcsh ( T-C shell ) I use bash because of it's similar behavior to sh. My power users swear by tcsh. I have no experience with ksh/zsh. I write scripts in sh ( for startup) and perl (for everything else). << Bill Bathurst bathurst@freerange.com suggested to check out http://mox.perl.com>> ---------------------------------------------- John G Dobnick jgd@csd.uwm.edu C-shell for scripts? Ick! Tom Christiansen, co-author of the "camel" book (Programming Perl, published by O'Reilley), has written a paper (diatribe?) on why the C-shell is a BAD idea for scripts. It's a fine interactive shell, but the pits for scripting. Better to use the Bourne shell (which _everyone_ has). This paper (_Csh Programming Considered Harmful_) can be found at: http://www.perl.org/CPAN/doc/FMTEYEWTK/versus/csh.whynot ------------------------------------------------------------------------ -------------------------------------------------- again - many thanks Dave -- Clinical Account Manager, Information Systems Healthcare Otago (Dunedin NZ) Ph external: 03 - 4740999 Ph internal: NB CHANGE extn 8830 email: daveb@healthotago.co.nz Pretentious quote of the week/month (whatever): "When a process is created, its parent process ID is the process ID of its parent process." man pages ..... ya gotta love em!