bash script question
Gary Kline
kline at thought.org
Tue Dec 1 23:27:43 UTC 2009
On Tue, Dec 01, 2009 at 11:10:33PM +0100, Polytropon wrote:
> 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.
>
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 at 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
More information about the freebsd-questions
mailing list