From owner-freebsd-chat Thu Aug 14 20:54:36 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id UAA04331 for chat-outgoing; Thu, 14 Aug 1997 20:54:36 -0700 (PDT) Received: from ethanol.gnu.ai.mit.edu (joelh@ethanol.gnu.ai.mit.edu [128.52.46.64]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id UAA04323 for ; Thu, 14 Aug 1997 20:54:33 -0700 (PDT) Received: by ethanol.gnu.ai.mit.edu (8.8.5/8.6.12GNU) id XAA07698; Thu, 14 Aug 1997 23:54:08 -0400 Date: Thu, 14 Aug 1997 23:54:08 -0400 Message-Id: <199708150354.XAA07698@ethanol.gnu.ai.mit.edu> To: andrsn@andrsn.stanford.edu CC: Studded@dal.net, FreeBSD-chat@FreeBSD.ORG In-reply-to: (message from Annelise Anderson on Wed, 13 Aug 1997 13:43:04 -0700 (PDT)) Subject: Re: Needed: Info on shells and script writing From: Joel Ray Holveck Reply-to: joelh@gnu.ai.mit.edu Sender: owner-freebsd-chat@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Thus were created the shells and counted thus: sh, jsh, rsh, ksh, csh, > > tcsh, zsh, and bash, and from these their offspring, too numerous to > > count. And thus was never created a judge of shells, and the hackers > > shall choose as they see fit. > I love this, the whole thing. Thank you. (And if you want to reproduce it, go ahead; I hereby disclaim all copyrights, but I'd like to know if you make any changes.) >> The first time you use adduser, it might ask for some defaults to >> save. You might want to make the default shell csh instead of sh, if >> it suggests sh as the default. Otherwise just press enter to accept >> each default. You may want to say how to change this. >> Your shell is the most important part of your working environment. In >> DOS, the usual shell is command.com. The shell is what interprets the >> commands you type on the command line, and thus communicates with the >> rest of the operating system. These two sentances should be transposed; explain what the shell is, then give an example. >> Two shells come installed with FreeBSD: csh and sh. csh is good for >> command-line work, but scripts should be written with sh (or bash). >> You can find out what shell you have by typing echo $SHELL. 'echo $SHELL' should be quoted somehow. If this is in TeXinfo, use its @samp (or @code, as you deem appropriate), or use quotes if it's in ASCII, but it should be clear that the period is not part of the part to type. >> It allows you to recall commands with the arrow keys and edit them. It >> has tab-key completion of filenames (csh uses the escape key), and it >> lets you switch to the directory you were last in with cd -. It's Ditto. You may also want to provide a pointer to the USD that describes csh. >> Here are the three steps for installing a new shell: >> 1. Install the shell as a port or a package, just as you would any >> other port or package. Use rehash and which tcsh (assuming you're >> installing tcsh) to make sure it got installed. Reword last sentance. rehash is sometimes necessary with bash, although I haven't figured out when. >> 3. Use the chsh command to change your shell to tcsh permanently, or >> type tcsh at the prompt to change your shell without logging in again. Remember that this is not going to change other users' shells; they may each run chsh to do so. >> Note: Do not change root's shell. It must be either sh or csh, because >> otherwise you may not have a working shell when the system puts you >> into single user mode. When you use su -m to become root, you will >> have tcsh anyway, because the shell is part of the environment. I forget, is toor a default user? Since toor's shell can be changed. You describe a bit about tcsh and using it, but not bash. I'll write a parallel to bash if you like. Other than these few minor points, it looks good! -- Second law of programming: Anything that can go wrong wi sendmail: segmentation violation -- core dumped