[X-Unix]from tcsh to bash
David Ledger
dledger at ivdcs.demon.co.uk
Wed May 18 22:31:50 PDT 2005
>From: sham khalil <shamkhalil at famaco.com.my>
>
>what's the reason for mac os x change it default shell to bash? is
>bash superior than tcsh? i just need to know
>
>sham khalil
</head below parapet>
is it safe to come up now?
tcsh is just csh with a lot of keyboard shortcuts added. So see
<http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/>
Skip past the file descriptor stuff if you don't know what they are.
Some of the entries, like the mail example with '!'s in the address
are still valid, but the DNS means we don't do that anymore.
csh/tcsh is probably the obvious choice for C programmers who don't
write complex scripts, ASIC designers, and others who prefer a C like
look.
sh, bash & ksh have an ugly syntax structure more akin to Basic than
to C, but it doesn't have csh's limitations.
It won't be exactly the order they were written in, but I met them in
the order (from '83) -
Bourne (sh); csh; enhanced Bourne (sh); ksh; bash; posix (sh); zsh & tcsh
I started with original Bourne and soon moved on to csh. When ksh
became available on the boxes I used I moved to that and havn't
looked back. As an ex-assembler programmer, I do tend to write
complex scripts sometimes that would be beyond the capabilities of
csh. Some people manage to work interactively in csh and script in
sh/bash/ksh, but quite often I end up with an interactive command
that uses all the default 24 lines in a terminal window.
It's best to stick with what you know unless you have time to
experiment, but if you're new to both I'd recommend bash or ksh.
>From: john harrold <jmh17 at pitt.edu>
>
> ... the reason that tcsh was dropped in favor of bash is that the prime
> engineering advocate for tcsh left Apple ... and all of the "new hires"
> had Linux backgrounds, not Unix.
Neither tcsh nor bash is particularly 'Unix', in fact mainstream Unix
people are more likely to use ksh or posix. It's a real
generalisation, but Unix boxes tend to be used in manufacturing and
financial environments where only s/w supplied with the OS or paid
for and supported is allowed. sh, csh, ksh & posix have been supplied
with more commercial versions of Unix for more years than tcsh or
bash have, and so they have higher usage.
There again, there are those who use perl as their shell.
David
--
David Ledger - Freelance Unix Sysadmin in the UK.
Chair of HPUX SysAdmin SIG of hpUG technical user group (www.hpug.org.uk)
david.ledger at ivdcs.co.uk
www.ivdcs.co.uk
More information about the X-Unix
mailing list