From owner-freebsd-questions Sun Jul 11 22:53: 6 1999 Delivered-To: freebsd-questions@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id F3CFF14CFF for ; Sun, 11 Jul 1999 22:52:59 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id PAA04404; Mon, 12 Jul 1999 15:22:58 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id PAA29432; Mon, 12 Jul 1999 15:22:57 +0930 (CST) Date: Mon, 12 Jul 1999 15:22:57 +0930 From: Greg Lehey To: "J. M. Albores" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Newbie: The "PS1" environment variable & others. Message-ID: <19990712152257.J21403@freebie.lemis.com> References: <37883A86.53F55E65@bigfoot.com> <19990711170901.S21403@freebie.lemis.com> <37896B5E.AD390164@bigfoot.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <37896B5E.AD390164@bigfoot.com>; from J. M. Albores on Mon, Jul 12, 1999 at 01:13:18AM -0300 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 12 July 1999 at 1:13:18 -0300, J. M. Albores wrote: > Greg Lehey wrote: >> >> On Sunday, 11 July 1999 at 3:32:38 -0300, J. M. Albores wrote: >>> [...] >>> I'd like to setup what in Linux is "$PS1", so the shell prompt may look >>> [userID@host /actual/path ]# >> [...] >> I think your real question is: how do I get bash as my shell? There >> are three things you need to do: >> >> 1. Install the port... >> [...] >> 2. Copy your Linux .bashrc and any other... >> [...] >> >> 3. Change your shell: run the chsh program... >> [...] > > First of all, thanks for you answer, Greg. You're welcome. > Well... In fact I had found the "chsh" command browsing man pages and I > was using /bin/sh, as I didn't find bash-VER.tgz in my CD-ROM even I > didn't do an intensive search, and I am not used to csh. > But -if it's possible in this list- I would like to ask other question: > Does C shell have any advantage over bash or sh? I was surprised that > (after a short experience with Linux) csh was the default shell for root > after FreeBSD installation! csh is the traditional Berkeley shell. It developed independently of the Bourne shell, and for a while it had (barely) better command line editing. Nowadays I can't see that it has any advantages at all. > Which is convenient for which purpose? You need a Bourne-style shell for scripts. You *can* write scripts in csh, but in practice few people do. >>> And, BTW three other questions: >>> >>> 1. I see two "profile", one in "/" as dot file, and one in "/etc" (???). >>> Is this the rule or I did something wrong? >> >> Well, you should have /etc/profile with system-wide defaults, and >> .profile in each user's home directory. That's the rule, and it's the >> same with Linux. You shouldn't have anything in /, since no user >> should have / as a home directory. >> [...] > > In my machine, every user has his own .profile at ~/ by default. > If I log as root, my /.profile is the same of /root/.profile. > > If I edit one file, the other changes too. And /.profile is NOT a > symlink to /root/.profile. (?!) It has just "common" file > permissions. I don't understand this. It could be a normal link. What do you get from this: ls -ali /.profile /root/.profile The 'i' tells ls to list the inode numbers. If they're the same, they're the same file. Some editors will write back to the same file, others, like Emacs, will create a new file. The results on the "other" file are very different. In the first case, they're still the same after editing; in the second case, the "other" file still has the old contents, and the edited file only has the new contents. Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message