bash script question

Polytropon freebsd at edvax.de
Tue Dec 1 22:10:36 UTC 2009


On Tue, 1 Dec 2009 13:45:55 -0800, Gary Kline <kline at 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.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list