Amos Shapira
Sun, 09 Jul 2006 16:50:39 -0700
On 10/07/06, Nadav Har'El <[EMAIL PROTECTED]> wrote:
> 2. Interactive use - use whatever you like. But this leads to what happens in the Technion: people used tcsh because they liked its interactivity, and this lead them to use tcsh for scripts, which sucks! So you should pick a shell which is good both for interactivity and scripting.
OK. You convinced me. I see your point now. I myself used to write scripts in csh and to shun from /bin/sh because I was more familiar with csh.
In fact, this issue is related to one of the things I like best about the Unix philosophy: scripting is just automating what you do interactively. If you know how to do something interactively, you already know how to script it - just take the commands and stick them in a file. This is a far-cry from what happens in the Windows world where there's a huge abyss between the way you do things interactively (using a mouse) and how you script them (using VB or COM or whatever).
Agreed.
I understand differently. As I understand, Bourne Shell and Csh were both created around the same time, independently (the former at Bell Labs, the latter at Berkeley), to replace Unix's first attempt of shell. They had completely different designs and emphases, but neither was meant to be more interactive than the other. Later, as CRT terminals became common
Not as far as I'm aware - csh was writen in Berkenely long after Bourne shell was writen in Bell Labs and with bourne-shell's inferior interactive features in mind.
(hey, we're talking ancient history here :-)), both shells were considered outdated, and replacements were written for both: David Korn of Bell Labs
Again, not as far as I'm aware. "Tcsh" was actually an adoption of ideas from the "Tenex" project (that's where the "T" came from) on top of csh, which already had command-line interactive support (e.g. history substitution and aliases).
designed ksh to replace the Bourne Shell, and in CMU "tcsh" was written to replace csh. ksh inherited sh's style, and tcsh inherited csh's style, so most objections many people had for csh scripting remained true also for tcsh.
True.
I just checked, and in Solaris 5.8, "echo" (a /bin/sh builtin) and "/bin/echo"
both do this:
$ echo -n hi
-n hi
$
With GNU/Linux's /bin/sh+echo or /bin/echo you get
$ echo -n hi
hi$
My Linux desktop at work was DOA (Dead On (my) Arrival) this morning so it's a bit difficult for me to check this - but depending on the particular distro you test this on - it could be that /bin/sh is actually a link to bash instead of a "real" /bin/sh.
> >A standard is needed, yes. But the 30 year old Bourne shell is too old... > > It's not that old. It was updated since its first introduction. Where is this update defined?
Can't tell without some digging which I can't do right now. Cheers. --Amos ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]