You are not logged in. Login Now
 0-24   25-49   50-74   75-99   100-124   125-143     
 
Author Message
jeffk
Shells: bbs, cshell, bourne Differences, switching between them. Mark Unseen   Nov 9 04:24 UTC 1992

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.
aa8ij
response 1 of 143: Mark Unseen   Nov 9 07:19 UTC 1992

  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.
power
response 2 of 143: Mark Unseen   Nov 9 21:59 UTC 1992

  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.
popcorn
response 3 of 143: Mark Unseen   Nov 10 04:27 UTC 1992

This response has been erased.

popcorn
response 4 of 143: Mark Unseen   Nov 10 04:31 UTC 1992

This response has been erased.

davel
response 5 of 143: Mark Unseen   Nov 10 04:35 UTC 1992

But the tip about gripe or help IDs has many other possible applications.
remmers
response 6 of 143: Mark Unseen   Nov 10 12:16 UTC 1992

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.
power
response 7 of 143: Mark Unseen   Nov 11 01:21 UTC 1992

  #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.
popcorn
response 8 of 143: Mark Unseen   Nov 11 04:26 UTC 1992

This response has been erased.

kentn
response 9 of 143: Mark Unseen   Nov 11 07:49 UTC 1992

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.
jeffk
response 10 of 143: Mark Unseen   Nov 12 00:17 UTC 1992

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.
davel
response 11 of 143: Mark Unseen   Nov 12 00:21 UTC 1992

Hm.  I'd assumed it gave you your own default shell.  (I use sh, so the
difference was not apparent.)
remmers
response 12 of 143: Mark Unseen   Nov 12 02:55 UTC 1992

You're right, it gives you your standard shell.  (It gives me csh.)
popcorn
response 13 of 143: Mark Unseen   Nov 12 05:53 UTC 1992

This response has been erased.

kentn
response 14 of 143: Mark Unseen   Nov 12 17:40 UTC 1992

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...
cwb
response 15 of 143: Mark Unseen   Dec 15 20:17 UTC 1992

     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
popcorn
response 16 of 143: Mark Unseen   Dec 20 15:09 UTC 1992

This response has been erased.

cwb
response 17 of 143: Mark Unseen   Dec 29 05:26 UTC 1992

  As Roger Rabbit would say: "P-P-P-P-P-P-Please!"
tsty
response 18 of 143: Mark Unseen   Dec 29 08:06 UTC 1992

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.
davel
response 19 of 143: Mark Unseen   Dec 29 14:51 UTC 1992

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.
remmers
response 20 of 143: Mark Unseen   Dec 29 16:53 UTC 1992

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.
cwb
response 21 of 143: Mark Unseen   Dec 30 02:25 UTC 1992

     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
davel
response 22 of 143: Mark Unseen   Dec 30 11:38 UTC 1992

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".
remmers
response 23 of 143: Mark Unseen   Dec 30 14:11 UTC 1992

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.
cwb
response 24 of 143: Mark Unseen   Dec 30 19:12 UTC 1992

     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?
 0-24   25-49   50-74   75-99   100-124   125-143     
Response Not Possible: You are Not Logged In
 

- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss