From owner-freebsd-questions@FreeBSD.ORG Tue Dec 1 23:27:43 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C02461065672 for ; Tue, 1 Dec 2009 23:27:43 +0000 (UTC) (envelope-from kline@thought.org) Received: from aristotle.thought.org (aristotle.thought.org [209.180.213.210]) by mx1.freebsd.org (Postfix) with ESMTP id 5EB2C8FC14 for ; Tue, 1 Dec 2009 23:27:43 +0000 (UTC) Received: from thought.org (tao.thought.org [10.47.0.250]) (authenticated bits=0) by aristotle.thought.org (8.14.2/8.14.2) with ESMTP id nB1NR2jF001609; Tue, 1 Dec 2009 15:27:03 -0800 (PST) (envelope-from kline@thought.org) Received: by thought.org (nbSMTP-1.00) for uid 1002 kline@thought.org; Tue, 1 Dec 2009 15:27:35 -0800 (PST) Date: Tue, 1 Dec 2009 15:27:35 -0800 From: Gary Kline To: Polytropon Message-ID: <20091201232735.GB99059@thought.org> References: <560275.79074.qm@web30808.mail.mud.yahoo.com> <4B15774A.5040700@lazlarlyricon.com> <20091201224210.15ab009d.freebsd@edvax.de> <20091201214554.GA98830@thought.org> <20091201231033.1d07ad59.freebsd@edvax.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091201231033.1d07ad59.freebsd@edvax.de> User-Agent: Mutt/1.4.2.3i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 23 years of service to the Unix community. X-Spam-Status: No, score=-4.4 required=3.6 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on aristotle.thought.org Cc: =?iso-8859-1?Q?D=E1nielisz_L=E1szl=F3?= , freebsd-questions@freebsd.org, Rolf G Nielsen Subject: Re: bash script question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 23:27:43 -0000 On Tue, Dec 01, 2009 at 11:10:33PM +0100, Polytropon wrote: > On Tue, 1 Dec 2009 13:45:55 -0800, Gary Kline wrote: > > Hi guys, > > > > Here's a bash-related question, kind-of. Is there any way to > > automagically run my .csrhc thru a script and wind up with a > > bash script? > > csh and (ba)sh use dufferent syntax and variable names. > But you could write an easy "search and replace" translator > for the .cshrc settings, which are mostly > > alias foo = 'bar' > set var = value > setenv envvar = value > > but for some of them, there's no bash equivalent (e. g. > set promptchars and set promt in cshrc, but PS1 in bash). > > I'm not aware of an already existing mechanism that does > this. Running one shell from the other doesn't transport > most of the settings. > Ah, Polyt to the rescue. I already have things like setenv aliased to ksh/zsh/borne-again/ and probably even /bin/sh || /bin/ash. I thought that especially bash was still persnikity. It used to be centuries ago, so I just stuck with zsh. Another deal was that I rarely use root, so it didn't worth it. But now, sweating the End of Days, yup. I'll see if vim can come to the resuce. thankee. gary > > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.31a release of Jottings: http://jottings.thought.org/index.php