[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: csh vs. (ba|(pd)?k)sh [From: Re: Thanks]
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: csh vs. (ba|(pd)?k)sh [From: Re: Thanks]
- From: "Denis A. Doroshenko" <d_(_dot_)_doroshenko_(_at_)_omnitel_(_dot_)_net>
- Date: Sun, 26 Aug 2001 15:19:02 +0200
- Mail-followup-to: misc_(_at_)_openbsd_(_dot_)_org
On Fri, Aug 24, 2001 at 03:44:50AM -0700, Mark Grimes wrote:
> > hmm, i remember such very old document, why csh is not suitable for
> > programming, and its interactiveness should not be greater than pdksh's
> > one. can somebody enlighten me what _could_ be the reasons for csh being
> > considered more secure than pdksh? so i am not secure by default,
> > because the first step i do at a fresh installed system is chsh at #
> > prompt? :-)
> csh != /bin/sh (aka pdksh) -- I think you are confusing the two.
no, i am not. indeed, i say, that csh is completely unsuitable as
command-prompt-shell, as well as a programming shell. one its history
mechanics can make one mad... at the same time, pdksh is vi/emacs style
history (personally i preffer vi mode), has tab completion, which is far
more comfortable than esc completion in csh... you must be mocking at
me, when you say csh is better! :-) but then again, the sentences written
here, are my personal opinion, and also there is no "right" or "wrong"
> > > There were reasons that csh was picked as the shell for root. Remember
> > > "secure by default", well as soon as you set BASH as the shell for root
> > > you are not default.
> > just wondering, are people using bash as interactive shell because of
> > some extra features or just because they used to?
> Isn't it tiring when new world open-source movement users like to
> shake up old world UNIX as to why things aren't implemented the
> 'correct' way? Questions like 'how do i setup masq under BSD' when
> they are refering to NAT.
well, it's just matter of definitions, or words. if you understand, what
the person asks about, what is the problem? well, i speak english with
visible (hearable) problems, i use wrong words and phrases, so should i
just keep silence and learn until i talk 100% correctly? as for me,
words don't matter, sense matters. if a sense is not clear, let people
rephrase it. why hurring to answer to a question, when you don't get it?
(i'm speaking about your first comment regarding confusing csh and ksh)
> I see >some< good innovative development
> coming from Linux-land, but I also see a lot of development coming
> from ppl that have not used or read up on UNIX before they were
> 'born' into the open source movement, which allows history to repeat
well, it's called human nature. if you will look at any region of human
activity, the history repeats here and there. is CS somehow special, to
behave with it in a different way?
> I can't seem to recall a csh specific vulnerability off the top of my head, I
> remember a couple bash issues over the past 3-4 years. It may be personal
> preference, but I think BSDish (c-shell types) shells are more friendly
> to the C programmer than AT&Tish (korn-shell types) -- some of us
> spend our lives in shells, rather than hidden behind GNOME/KDE,
> over the years I've opted for csh-like syntax between the two when it
> comes to complex i/o redirection.
more friendly to the C programmer? well, unless C is the _only_ thing
you wanna now, csh is not as friendly. after all, i think something like
Pike will be even more friendly to the C programmer. in csh it is juts
several key words similar to C, but other are not! it is even worse,
csh is just _partly_ like C, the other part is far from such similarity.
it is obvious, that ksh is more powerful at CLI and as a programming
language, that's why all scripts in the system are written in ksh, and i
was very confused, when found (at that time it was OpenBSD 2.4) a couple
of csh scripts in the source tree. just some "C programmer" wrote them,
and nobody bothered to port them to ksh...
the document i mentioned showed many things with redirections,
variables, that are difficult or impossible to do with csh, and which
are done simply with [k]sh...
> The largest complaint I hear about csh is solely access to command
> line completion is an expensive reach to ESC and using !! and
> substitution can be often more painful than a few presses of the
> arrow key (both of which are cured through Emacs).
yeah... i may be repeating myself, but ESC and !! is especially
incomfortable. set -o vi (for a man using vi editor) and tab complete
just rocks. why should i crypt something at command line with !! (i know
there is a way to substitute substrings in previous commands and run the
result in csh, but my God, it is so cryptic!)?
> There are still other shells that are very nice like tcsh (my
> favorite) and zsh, that provide this additional functionality
> that make shell-life very comfortable.
yes, they make, but for me pdksh is enough, relatively compact, fast not
overwighted with features to include the whole universe into command
> It's best to keep the root shell minimal and audited... as long as
> sudo is audited, what's so painful about utilizing this for the few
> times root is needed (a la s/w installation)
sure, but than again, pdksh is small, and seems to be audited (or it is
not being for ~6 years within OpenBSD?), and it is <empasize>Bourne
shell compatible</emphasize>. i think it is the argument which is
coherent to your words about unix and history...
> While I'm babbling - I will stress again - make SURE your root shell
> is STATICALLY LINKED.
heh... but the answer is not uncloaked... why csh is the root's shell?
Denis A. Doroshenko [GPRS engineer] .-. _|_ |
[Omnitel Ltd., T.Sevcenkos st. 25, Vilnius, Lithuania] | | _ _ _ .| _ |
[Phone: +370 9863486 E-mail: d_(_dot_)_doroshenko_(_at_)_omnitel_(_dot_)_net] |_|| | || |||(/_|_
Visit your host, monkey.org