From: RPS on

I just bought a new iMac with 10.6. Installed developer tools, a few SW
updates, etc.

Today I opened Terminal and discovered that I don't have basic unix
commands like rm and pwd (OTOH, ls works). I am using tcsh, having
selected /bin/tcsh in account/user preferences.

I am no Unix genius but this stuff has always worked. Where do these
commands live in OSX? How can I download them again?

Thanks.
From: RPS on
Found them. My path variable somehow become corrupt and was missing
/bin . Sorry about the panic.
From: Paul Sture on
In article <080820102313102603%rps(a)null.void>, RPS <rps(a)null.void>
wrote:

> I am using tcsh, having
> selected /bin/tcsh in account/user preferences

tcsh was the default shell in early versions of OS X, but this changed
to bash in 10.4 or so.

I switched to bash mainly because there are more bash code examples out
there, but quickly found that I preferred it to tcsh.

--
Paul Sture
From: RPS on
Paul Sture <paul.nospam(a)sture.ch> wrote:

> > I am using tcsh, having
> > selected /bin/tcsh in account/user preferences
>
> tcsh was the default shell in early versions of OS X, but this changed
> to bash in 10.4 or so.
>
> I switched to bash mainly because there are more bash code examples out
> there, but quickly found that I preferred it to tcsh.

I understand. In general I do like to stay with Apple's defaults for
best support going forward. I continue with tcsh just because of habit
and the cshrc file I have gotten used to. Is there an advocacy
article/site that would explain why bash is better and how to make the
switch painless? :)
From: Bob Harris on
In article <090820100923140204%rps(a)null.void>,
RPS <rps(a)null.void> wrote:

> Paul Sture <paul.nospam(a)sture.ch> wrote:
>
> > > I am using tcsh, having
> > > selected /bin/tcsh in account/user preferences
> >
> > tcsh was the default shell in early versions of OS X, but this changed
> > to bash in 10.4 or so.
> >
> > I switched to bash mainly because there are more bash code examples out
> > there, but quickly found that I preferred it to tcsh.
>
> I understand. In general I do like to stay with Apple's defaults for
> best support going forward. I continue with tcsh just because of habit
> and the cshrc file I have gotten used to. Is there an advocacy
> article/site that would explain why bash is better and how to make the
> switch painless? :)

What features of tcsh do you like (besides not rewriting your
cshrc).

For example, when I was a csh/tcsh user I liked

!!
!*
Control-P
vi command line editing option

That is basically what I liked and until bash, I could not get in
other shells.

The !! and !* are build into bash, as is the vi command line
editing.

I emulated the Control-P capabilities using bash 'bind' commands
and using 'cat -v' to discover the escape sequences I needed to
inject up-arrow, down-arrow keys via a 'bind' command.

I also agree with Paul Sture with respect to scripting. I always
preferred bourne shell based scripts (I write a lot of them),
finding that csh/tcsh scripts were awkward. Now with bash as my
shell, I can use for and while loops from the command line, for
quick tricks.

bash also provides the bourne shell functions, which gives you a
lot more flexibility over a command alias (which you also have).
There were a few things I used to do via a csh alias that had to
do a 'source' command so that I could mess with things like the
current working directory, or so that I could initialize
environment variables at the command prompt level. With bourne
shell functions, they run as the command prompt level, so any cd
or variable changes happen in the current process context. It has
simplified a bunch of things I use at the command prompt.

So I would suggest you inventory exactly what it is that csh/tcsh
does for you, and see if you can get those things from bash. And
there is a strong following for zsh as well. Again a bourne shell
relative, it is just not the default Mac OS X shell.

Bob Harris