Re: csh question: foreach

From: Kenny McCormack (gazelle_at_yin.interaccess.com)
Date: 10/20/04


Date: Wed, 20 Oct 2004 16:16:59 GMT

In article <m3acuhtmky.fsf@invalid.address>, <joe@invalid.address> wrote:
...
>> >Out of curiosity, what compelling command line features
>> >does ksh offer that bash and tcsh don't?
>>
>> The answer is: nothing.
>
>Not quite. For example, I frequently use command lines that redirect
>stderr to /dev/null, so I can just see stdout. I'm not aware that you
>can do that in csh/tcsh without having to start subshells etc.

The key word is "compelling".
And "compelling" is in the eye of the beholder.

>> The point of this eternal war is that those who use an sh-like shell
>> (ksh, ksh93, bash, etc) as their interactive shell are simply making
>> a tradeoff. They are sacrificing some measure of comfort/efficiency
>> for the sake of consistency. Nothing wrong with that, of course.
>> We all make our choices.
>
>Consistency is a good thing. What kind of comfort/efficiency do you
>see is lost with ksh or bash?

They don't work as well as tcsh does.

>It's been a long time since I've used csh, but when I found out about ksh
>I recall being amazed at how much easier it made command line work.

Apples & Oranges.

ksh is better at command line editing than csh (which has none)
but tcsh is much better than ksh. Some people seem to be OK with bash's
command line editing facilities, but, IMHO, tcsh is better than bash.

Needless to say, comfort is also in the eyes of the beholder.



Relevant Pages

  • Re: Set -o Vi Causes core dump and segmentation fault
    ... set -o vi command and nothing happened. ... different from the parent shell's editor it causes this segmentation ... Our parent shell is bash and the editor is set (by /etc/ ... If you then spawn a ksh subshell,run set -o vi, ...
    (linux.redhat)
  • Re: Set -o Vi Causes core dump and segmentation fault
    ... some kernel changes are made. ... set -o vi command and nothing happened. ... different from the parent shell's editor it causes this segmentation ... If you then spawn a ksh subshell,run set -o vi, ...
    (linux.redhat)
  • Re: Set -o Vi Causes core dump and segmentation fault
    ... set -o vi command and nothing happened. ... After a day of divide and conquer on 18 scripts we have figured ... different from the parent shell's editor it causes this segmentation ... If you then spawn a ksh subshell,run set -o vi, ...
    (linux.redhat)
  • Solaris POSIX sh/ksh bug (Was: shell scripting with solaris, help)
    ... >>Your system has to be broken somehow. ... command substitution optimisations. ... ksh doesn't fork a new process if cmd is a builtin. ...
    (comp.unix.solaris)
  • Re: getting current directory
    ... Not if /bin/sh is a symlink to zsh (in which case zsh emulates ... /usr/xpg4 in turn certainly is a Solaris specific path. ... >> To work around a bug in most kshs. ... But "command" itself happens to fork and exec a command, ...
    (comp.unix.shell)