|
|
So far I would say that most of us have seen the bbs shell. I know of the C Shell and the Bourne Shell from the initial newuser stuff. What are these shells and how would we switch to them if we've already gotten setup with bbs?
143 responses total.
I used to use bbs shell, but of late I use csh. I changed it by asking
popcoror remmers to do it for me. The thing I like about it is the alias
commands... which are useful.
if ($?prompt) then
set history=200
alias hi history
alias so source
alias p bbs
alias z elm
alias a logout
alias hi history
alias g backgammon
alias tset '/usr/ucb/tset -s \!* >/tmp/ts.$$ ; source /tmp/ts.$$ ; rm
/tmp/ts.$$'
endif
this is what I use for my commandsthey are easy, and quick.
You can also change your shell using the chsh command. Just type !chsh at any Picospan prompt (or just chsh at a Unix prompt), and enter a new shell. Valid shells are: /bin/sh - the Bourne shell /bin/csh - the c shell <---- My personal favourite /usr/local/bin/tcsh - an improved c shell /b - Picospan If you're interested for a decent .login file for csh to get you started on your own, look at mine: ~power/.login.
This response has been erased.
This response has been erased.
But the tip about gripe or help IDs has many other possible applications.
Hmm... Maybe we ought to put a wrapper around chsh that automatically creates default initialization files for people. Shouldn't be too hard to do.
#6: If someone does create a wrapper that checks and makes default init files, make sure it checks for pre-existing ones! It would be pretty vexing to have my .login file overwriten because I switch to sh for a few minutes and then back to csh... Also, for you silly IBMers out there, a Unix shell is something like a DOS prompt (as in the C:\ prompt). If you're competant with DOS, DOS is basically a ripoff combining CP/M and Unix, so Unix should be fairly easy to pick up.
This response has been erased.
Heh...good point. I've got my csh going now, but for a day I was locked out of the bbs. Still not sure what all I want in .cshrc and .login, but for now it's working... Apparently chsh totally wipes out your old .login.
You can always try out a shell, just by typing ! by itself. This will stick you into a Bourne shell, I believe. This is, of course, meant to be typed coming from PicoSpan.
Hm. I'd assumed it gave you your own default shell. (I use sh, so the difference was not apparent.)
You're right, it gives you your standard shell. (It gives me csh.)
This response has been erased.
Could be...my .profile is okay, so maybe I just didn't have much in .login. Definitely didn't have a search path; I wonder why chsh doesn't putin some sort of generic search path? Anyway, it's working now thanks to popcorn's help. Time to explore the wonderful world of Unix...
Forgive me if I'm being dense, but I'd like
to see a step-by-step procedure for setting up a
unix shell. I know something about unix,
but I wish to learn more, and I think it's time for
me to start using a unix shell rather than the bbs shell. So what
do I have to do in order to set up a shell. Which shell
should I use? (What that means is: what benefits
are there in the different unix shells?)
Chris
This response has been erased.
As Roger Rabbit would say: "P-P-P-P-P-P-Please!"
About all I can sayis that there are 4 shells here; bbs, C-shell,
Bourne Shell and Korn Shell. There are probably others. bbs shell
"seems" to be the easiest to use, it immediately pops you into
a "something" rather than a "nothing."
You can "shell out" to any of the others (maybe you can create
your own) and use the associated commands. About the only difference
I can detect (and I'm *really* new at Unix) is that there are
more commands and easier syntax in C-shell.
Quoting from _Unix in a Nutshell_ (O'Reilly and Associates, 2nd Ed,
(c) 1992) ISBN: 1-56592-001-5; "There are three main uses for
the shell: Interactive use; Customization of your UNIX session; and
Programming."
"A UNIX shell defines variables to control the behavior of your UNIX
session. ... Some variables are preset by the system, ... others
you define ... in start-up when you login."
A reference to DOS Batch files is made (and is accurate).
"This quick reference describes the three most popular shells:
The Bourne (or standaared) shell, the most compact but also
the simplest.
The Korn shell, a superset of the Bourne shell that lets you
editthe command line.
The C Shell, which uses C syntax and has many conveniences."
My perception, as primitive as it may be, is that unless you are
involved in some seriously intensive programming, the shell you
use is not all that relevant, objections welcome.
It's almost the same as editor "wars," what you grew up on is what
you know best and, conswquently, prefer. Vi, Emacs, Jove, Ed, Ex, and
Marcus's Bbs editor all function well, within their parameters.
UNIX is a fairly "wild west" territory accessible to tons more
people than earlier Operating Systems, i.e. DOS, CP-M,
main-frame OS's from main-frame maunfactureres, or micro-computer
Operating systems from Amiga, Apple, Macintosh, Atari, Etc ....
In summary, (geeze, have I typed THAT much), buy every O'Reilly
book you can find (and I <unfortunately> own NO stock).
If you are comming from DOS, a book entitled, _DOS meets UNIX_ is
someplace to start.
Quoting from a friend of mine, UNIX is " a multi-tasking, multi-user,
interactive Operating System," which to me means a main-frame in
the palm of as many users as there are tty ports connected.
Personally I found sh syntax easy to master, & every time I've tried to use csh I've gotten tangled up. Obviously a matter of taste and background. (For the Unix I've worked with most there's a command-line editor available for sh, removing my single largest temptation to tackle that learning curve.) Whatever shell you use, expect to spend time hunting through the man until you learn all the things you need to use regularly.
The history mechanism and job control capabilities of the C shell are plusses for interactive use. It's nice to be able to re-execute a recently entered command without typing it in again from scratch. And it's convenient to be able to suspend a task, go do something else, and then resume the suspended task from the point you left off. But the C shell has too many syntactic exceptions and inconsistencies for my taste. Too many things that should work but don't because you're bumping into some "feature". The Bourne shell is much cleaner in this respect, so I greatly prefer it to the C shell for programming. The Korn shell combines the best of both, and if Grex had it I'd probably use it as my login shell.
It sounds like the Bourne shell is the one I'm
most familiar with. John, is it similar to the
shell on EMUNIX?
I've actually used UNIX before, so what I need is
the how-to on setting up Bourne as my
login shell. Sorry, I wasn't
clear.
Chris
To permanently change your default shell, enter "chsh". It will prompt you for a new shell; give it sh or csh or whatever. You can really tangle yourself up if you do this wrong! I believe that chsh checks that the program you specify exists and that you have execute permission for it, but it's not guaranteed to be anything that will actually work as a login shell. To *temporarily* change your shell: If you're at a Unix shell prompt, just enter the program name of the new shell. exit (or something appropriate - it's exit for sh and csh) will take you back where you were. If you're at a Picospan prompt, you have to prefix the new shell's name with ! (as usual). If you make sh or csh your default shell, you can bring up Picospan on top of it (as a new shell) by entering "bbs". This takes an optional conference name as a parameter. If, say, you wanted Info as the conference you see first (instead of Agora), you could enter "bbs info".
Re #21: The default shell on emunix is csh. In everyday interactive use -- simple commands, pipelines, input-output redirection -- there's little difference between the two shells. I prefer the C shell to Bourne for interactive use because of its history mechanism and job control. In the more complex situations encountered in programming, I prefer the Bourne shell because it is much cleaner.
So, if I use sh as my login shell, I can then edit a file called .login, putting UNIX commands in it to give me a custom setup right?
No, .login is for csh, the C shell. With the Bourne shell sh, the equivalent file is .profile.
Ok, I'm ready to make the leap from sh to csh. How do I make the chage
permanent? What differences am I going to find other than the prompt? Will
I have to make any changes in my various .*rc files?
Chris, the fearfully ambitious.
Before you try it permanently, I'd suggest just running csh & trying stuff to make sure you know what you're doing enough to get by. Assuming you've done that, the chsh command will let you change your login shell (stored in /etc/passwd, the password file). You can run it interactively by just saying chsh at a shell prompt (or !chsh from a bbs prompt). Or you can give it a username (yours) and a shell on the command line, as: chsh cwb csh (though I think probably it had better be /bin/csh, as that's what a quick scan of /etc/passwd shows for everyone else). I *think* few if any of your *rc files should need changing; these are commands local to a specific program, and to the extent that they give shell commands they'd be mostly specifying other programs. What I don't know about (since I've stuck with sh, myself) is how you should set up control files such as .login and .cshrc and .logout. I believe .login runs instead of the .profile that runs for sh users, but it may be *in addition to* .profile I'm sure someone will say something about these, but you can (make that should) also find a few people around who use csh and look at theirs.
This response has been erased.
Ummmmmm, I just scribbled the above, pending a quick accuracy check from a couple other folks ... When/if it gets put back in, it SHOULD provide directions for a relatively painless, trouble free, (in Unix ... ha!) method and specific directions for making the switch, he said ...
Csh runs .cshrc every time it starts up, login shell or not. After running .cshrc, it runs .login if and only if it's running as a login shell. To change your shell, just type "chsh". It will say, "Changing shell for <username>", print out your old shell, and let you enter a new shell. Type "/bin/csh" for csh, or "/usr/local/bin/tcsh" for tcsh, or "/bin/sh" for sh.
Well, no one replied to the email so just go for it and if it works by establishing those necessary files, fine. If not, create a new ID and email staff ..........
What is the difference between /bin/sh and /usr/bin/sh ?
I want to change my shell to one which uses .profile rather
than .login (this may change later) and would like some help
determining my route. Thanks!
No difference at all - they are in fact the same physical file under two names.
However, if they're not both on your path, your .profile may be non-portable.
I've used the "change" program, but this is the first I've heard of chsh. Is there anything to the change program besides a call to chsh?
And what is the meaning of "portable" within the context of #34?
I'm interested in that, too, John.
I meant that if you exploit the fact that /usr/bin and /bin are the same directory, by putting only one of them in your path, and then try to install your .login or .profile on some other Unix system, you'd be lacking some commands if /usr/bin and /bin are different (which they often are).
Ahh. In other words, a rather simply repairable potential problem. Thanks.
| Last 40 Responses and Response Form. |
|
|
- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss