Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Dec 2009 15:27:35 -0800
From:      Gary Kline <kline@thought.org>
To:        Polytropon <freebsd@edvax.de>
Cc:        =?iso-8859-1?Q?D=E1nielisz_L=E1szl=F3?= <laszlo_danielisz@yahoo.com>, freebsd-questions@freebsd.org, Rolf G Nielsen <lazlar@lazlarlyricon.com>
Subject:   Re: bash script question
Message-ID:  <20091201232735.GB99059@thought.org>
In-Reply-To: <20091201231033.1d07ad59.freebsd@edvax.de>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 01, 2009 at 11:10:33PM +0100, Polytropon wrote:
> On Tue, 1 Dec 2009 13:45:55 -0800, Gary Kline <kline@thought.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091201232735.GB99059>