The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - Newcomers (http://hintsforums.macworld.com/forumdisplay.php?f=15)
-   -   Command line in Panther (http://hintsforums.macworld.com/showthread.php?t=16263)

jiclark 10-22-2003 02:02 AM

Command line in Panther
 
Seeing how Panther is coming this week, I'm wondering what changes it holds in store in terms of the command line... I seem to remember reading somewhere that the default shell is changed in Panther, it that true? If so, what are the ramifications for us Unix wannabes? I think it was said that the shell is now going to be bash by default? Can anyone recommend a few resources for learning the differences between tcsh and bash? What are the benefits to bash (if that is indeed the new default shell)?

Thanks, as always,
John-o

P.S. sorry if this is a repeat, I don't have much success doing searches in this forum, so I tend to not even try much anymore!

Craig R. Arko 10-22-2003 05:02 AM

Panther support threads => Friday.

We'll re-open this then. I bet there will be lots of responses. ;)


P.S. - a place to get started is typing 'man bash' in a Jaguar shell, since bash is also installed there. And you can the user's default shell in NetInfo Manager.

Craig R. Arko 10-23-2003 10:36 AM

Thread re-opened.

WCityMike 10-25-2003 06:46 PM

No responses yet, I note.

However, two things FYI from a Panther owner:

(a) If you do an upgrade install, you keep tcsh.

(b) You're able to tell Apple to have 'tcsh' by changing the appropriate entry for your user name in NetInfo Manager.

hayne 10-25-2003 10:39 PM

One more comment (from a not-yet Panther owner):
There should be no problem at all in keeping tcsh as your shell if that is what you had before, or in changing new accounts to use tcsh - if you want to do so. This will not affect anything else in the system.
Nor will it affect the shell scripts that you might write since when you write a script, teh first line tells the system which shell you want to use - and it has never been recommended to use tchs for shell scripting.

So, it only affects your interactive use of the command-line, and hence your choice is one of personal preference. I might imagine that more and more people would start to use bash (since it is now the default) and hence the instructions that you might receive from others might be assuming bash rather than tcsh. Otherwise, no big deal.

mervTormel 10-25-2003 10:48 PM

john, if you haven't settled on an interactive shell yet, investigate zsh.

you can kick the tires and get stick time on any of the shells, but if you don't know what you're looking for, you become a JAFO (just another frustrated observer).

so, skip all the comparisons and fiddly bits and jump right into zsh. it is an excellent shell with good lineage and lots of power (heh, sounds like i'm a dog breeder).

max_zorn 10-26-2003 08:51 AM

Quote:

Originally posted by mervTormel
john, if you haven't settled on an interactive shell yet, investigate zsh.

you can kick the tires and get stick time on any of the shells, but if you don't know what you're looking for, you become a JAFO (just another frustrated observer).

so, skip all the comparisons and fiddly bits and jump right into zsh. it is an excellent shell with good lineage and lots of power (heh, sounds like i'm a dog breeder).
mervTormel,

if one is a newbie (like me), this sounds like a risky and potentially very time consuming idea unless zsh is compatible with bash? Reason: if it is not, then all the information you will find on the web or in books on panther will be harder for you to use as you would've to translate into zsh? For this reason, I am taking the plunge and use now bash on my macs (which is actually helpful since bash is also default on almost every Linux box).

max (JAFFU, just another frustrated fink user - actually not even a user at this point ;) )

jiclark 10-26-2003 11:43 AM

max,

You and I are in the same place, exactly.

Quote:

(JAFFU, just another frustrated fink user - actually not even a user at this point)
That said, merv's is not the first recommendation I've had to go with zsh. I don't understand all the ramifications, obviously; but from what I understand, if zsh is as good as these folks claim, then it won't be difficult to translate things we learn for other shells into commands that will work in zsh. Am I making any sense?

Merv, can you enlighten a couple of newbies?

Thanks,
John-o

sao 10-26-2003 12:08 PM

jiclark,

You can read some good threads about zsh from our Unix - General forum:

http://forums.macosxhints.com/showth...tching+to+Bash

http://forums.macosxhints.com/showth...&highlight=zsh

http://forums.macosxhints.com/showth...&highlight=zsh

http://forums.macosxhints.com/showth...&highlight=zsh

Quote:

max_zorn wrote:
just another frustrated fink user - actually not even a user at this point
Fink is working well here. What's the problem you are having?

max_zorn 10-26-2003 12:21 PM

Quote:

Originally posted by jiclark
max,

You and I are in the same place, exactly.



That said, merv's is not the first recommendation I've had to go with zsh. I don't understand all the ramifications, obviously; but from what I understand, if zsh is as good as these folks claim, then it won't be difficult to translate things we learn for other shells into commands that will work in zsh. Am I making any sense?
John-o,

this makes sense. As I see it, there are two groups of fink/unix users: those who really would like to understand what is going on, with shell programming etc and those who really would like to just use the tools. If you belong to the former group, then it is probably fine and worthwhile to learn zsh. Regrettably, I am firmly in the latter group: I just would like my tools to work (especially ghostview...). When I was a teenager, I was programming 6052 assembler etc, but I have a job and simply no time to dig into things anymore. In fact, what I hope is that Mac OS X will eventually be just a simple nice BSD distro. I use Mandrake Linux at work, and of course ghostview and all xtools work after installation... Unlike what poor fink users experience. (Yes, I would even pay if somebody made the tools run without pain.)

Apple is hip and the outside world think they would get a free unix ride with Mac OS X (witness any slashdot thread). But Apple is far from being there... Open terminal.app and type xterm. They want to separate their stuff from x11, which is a stupid idea IMO. Once the panther dust settles, I will try orborosx again (where you can type xterm within terminal.app and actually get an xterm) ...

Cheers,

Max

mervTormel 10-26-2003 12:32 PM

zsh and bash are of the sh shell family; good lineage.

tcsh is of the csh shell family, and that's all i gotta say about that.

max_zorn 10-26-2003 12:40 PM

Quote:

Originally posted by sao

Fink is working well here. What's the problem you are having?
Dear sao,

I elaborated a little at http://forums.macosxhints.com/showth...threadid=16331. Since then, I tried the following: I copied /sw from a Jaguar mac to my panther mac. It sort of works, but gnuplot does not bring up a plot window, and ghostview is still broken. On the other hand, gnumeric works fine.

I noticed that ghostview was broken ever since I upgraded from 10.2.6 to 10.2.8, at least under Apple's X11, but not under orborosx...

If you have (detailed) suggestions what I could try (I am willing to ditch /sw again), then I would give it a shot. I have the same set up as you, and I installed all the goodies recommended by R. Koch, see http://www.uoregon.edu/~koch/texshop/texshop.html, using i-Installer...

Cheers,

max

max_zorn 10-26-2003 01:00 PM

Quote:

Originally posted by mervTormel
zsh and bash are of the sh shell family; good lineage.

tcsh is of the csh shell family, and that's all i gotta say about that.
mervTormel,

would that mean that instructions given for default panther users for bash would work unchanged on zsh?

mervTormel 10-26-2003 01:29 PM

Quote:

Originally posted by max_zorn
would that mean that instructions given for default panther users for bash would work unchanged on zsh?
i know not what this means, so, i'll have to say no. instructions for zsh are for zsh. instructions for bash are for bash.

a bash function/alias will work in zsh, since they are of the same family of syntax, ergo bash is largely portable to zsh.

max_zorn 10-26-2003 01:37 PM

Quote:

Originally posted by mervTormel
i know not what this means, so, i'll have to say no. instructions for zsh are for zsh. instructions for bash are for bash.

a bash function/alias will work in zsh, since they are of the same family of syntax, ergo bash is largely portable to zsh.
We will soon see lots of tips and tricks for Panther users using unix (books, web, etc.). I would expect that if only one set of instructions is given, it will refer to the default bash shell. That is what I meant :) .

mervTormel 10-26-2003 01:45 PM

everything requires some reasonable translation. best to sanity test things like this with some knowledge. i.e., if is seems iffy, test small portions of the hints for expected results.

hayne 10-26-2003 08:59 PM

Quote:

Originally posted by max_zorn
But Apple is far from being there... Open terminal.app and type xterm. They want to separate their stuff from x11, which is a stupid idea IMO. Once the panther dust settles, I will try orborosx again (where you can type xterm within terminal.app and actually get an xterm)
Sorry - I don't yet have Panther so can't try it to see what you mean. But I don't think Apple is trying to separate "their stuff from X11" at all. As I said, I don't know what happens when you type 'xterm' in a Terminal window, but I would expect that (if it is on your PATH), that the X server would start up (if not started already) and then an xterm window would appear. What does happen instead? Maybe there is an easy way to fix it.

pmccann 10-26-2003 10:29 PM

Nup, the X11 server doesn't launch automatically. Just fire it up as a login item, and throw

setenv DISPLAY :0.0

into your .login file (if you're still using tcsh), or

export DISPLAY=:0.0

if you're using a sh derived shell (bash or zsh) in
the appropriate place for those shells. (.zlogin for
zsh or .bash_profile (I think) for bash). Someone slap me if I'm wrong on the bash thing.

Anyway, you set that up once --about 1 minute's work-- and you can run X11 apps without a second's thought thereafter. Not a bad deal really...

Cheers,
Paul (happy to be on Panther, and happier to be using Panther on a nice fast G4 with a flat panel--on loan for six months from a colleague who's just received his dual G5 with 20" flat panel. Certainly beats slumming it on an iMac DV400!)

max_zorn 10-26-2003 10:46 PM

Quote:

Originally posted by pmccann
Nup, the X11 server doesn't launch automatically. Just fire it up as a login item, and throw

setenv DISPLAY :0.0

into your .login file (if you're still using tcsh), or

export DISPLAY=:0.0

if you're using a sh derived shell (bash or zsh) in
the appropriate place for those shells. (.zlogin for
zsh or .bash_profile (I think) for bash). Someone slap me if I'm wrong on the bash thing.

Anyway, you set that up once --about 1 minute's work-- and you can run X11 apps without a second's thought thereafter. Not a bad deal really...

Cheers,
Paul (happy to be on Panther, and happier to be using Panther on a nice fast G4 with a flat panel--on loan for six months from a colleague who's just received his dual G5 with 20" flat panel. Certainly beats slumming it on an iMac DV400!)
pmccann,

thanks - I didn't know about this! Works great!
Already changed my .bash_profile. Do you
happen to know how I must modify my path
to have the terminal.app actually see the goodies?
Typing /usr/X11R6/bin/xterm is not much fun
- is it enough to put /usr/X11R6/bin in the path?

Cheers,

max

max_zorn 10-26-2003 11:00 PM

Quote:

Originally posted by hayne
Sorry - I don't yet have Panther so can't try it to see what you mean. But I don't think Apple is trying to separate "their stuff from X11" at all. As I said, I don't know what happens when you type 'xterm' in a Terminal window, but I would expect that (if it is on your PATH), that the X server would start up (if not started already) and then an xterm window would appear. What does happen instead? Maybe there is an easy way to fix it.
hayne,

xterm is not found by default and
even the absolute path would not start it;
however, pmccann's fix works just great.
Slightly unfortunate defaults, but after
nearly two full days, I am starting to
become a happy camper :) ...

Cheers,

max

pmccann 10-27-2003 10:09 PM

Hi Max,

good to hear that things are settling down: you've probably already answered your own question, but *yep*, just add /usr/X11R6/bin to your PATH and everything will be easily accessible.

Cheers,
Paul

max_zorn 10-27-2003 10:20 PM

Quote:

Originally posted by pmccann
Hi Max,

good to hear that things are settling down: you've probably already answered your own question, but *yep*, just add /usr/X11R6/bin to your PATH and everything will be easily accessible.

Cheers,
Paul
Thanks, Paul --- I am a happy camper now :)

Cheers,

max


All times are GMT -5. The time now is 10:42 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.