Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Apr 2000 14:38:36 +0200
From:      "Marius Vincent" <mvincent@elcb.co.za>
To:        "freeBSD-Questions" <freebsd-questions@freebsd.org>
Subject:   Thrashing Bash
Message-ID:  <NEBBJNFFELDAHIBIGIAMMECBCBAA.mvincent@elcb.co.za>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]


I have got a dialemma.Actually i am stupid not just to do it the traditional
way but i guess i have my reasons.

It goes like this......
I have root setup to use csh shell. So everytime I login via root i get a
csh prompt.
I want to leave it at this because bash is a addon when you install to bsd
and Incase my box get screwed up and the shell is not there i get locked out
of root.Now I want to create a little script that calls up bash for root.For
instance I want to login as root and type in "b"(b will be a file calling up
bash and *here is the problem* it must run PS1="[\u@\h \W]\\$ ").

Now bash is a programm in it's own that when i execute it, it will open a
shell in a shell,so then the file contaning PS1=blah will not run because
there is a new shell being opend and the rest of the file is not being
executed.

Now how do i get PS1=blah to export to the terminal?
I tried to create a .bash_profile and added the PS1=blah into it and it does
not work.

So what I am looking for is for bash to reinhibit the enviroment once I
execute the shell in another shell.
This must also work on a per user level not global.
HOW??

Thanx

Marius Vincent
Technical
ELCB Information Services



[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR></HEAD>
<BODY>
<DIV align=left class=OutlookMessageHeader dir=ltr>&nbsp;</DIV>
<DIV align=left class=OutlookMessageHeader dir=ltr>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=290241111-26042000>I have got a 
dialemma.Actually i am stupid not just to do it the traditional way but i guess 
i have my reasons.</SPAN></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=290241111-26042000>It goes like 
this......</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=290241111-26042000>I&nbsp;have root 
setup to use csh shell. So everytime I login via root i get a csh 
prompt.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=290241111-26042000>I want to leave it 
at this because bash is a addon when you install to bsd and Incase my box get 
screwed up and the shell is not there i get locked out of root.Now I want to 
create a little script that calls up bash for root.For instance I want to login 
as root and type in "b"(b will be a file calling up bash and *here is the 
problem* it must run PS1="[\u@\h \W]\\$ ").</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=290241111-26042000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=290241111-26042000>Now bash is a 
programm in it's own that when i execute it, it will open a shell in a shell,so 
then the file contaning PS1=blah will not run because there is a new shell being 
opend and the rest of the file is not being executed.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=290241111-26042000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=290241111-26042000>Now how do i get 
PS1=blah to export to the terminal?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=290241111-26042000>I tried to create a 
.bash_profile and added the PS1=blah into it and it does not 
work.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=290241111-26042000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=290241111-26042000>So what I am looking 
for is for bash to reinhibit the enviroment once I execute the shell in another 
shell.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=290241111-26042000>This must also work 
on a per user level not global.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=290241111-26042000>HOW??</SPAN></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV align=left><FONT face=Arial size=2>Thanx</FONT></DIV>
<DIV align=left>&nbsp;</DIV>
<DIV align=left><EM><FONT face=Arial size=2>Marius Vincent</FONT></EM></DIV>
<DIV align=left><EM><FONT face=Arial size=2></FONT></EM></DIV>
<DIV align=left><FONT face=Arial size=2><EM>Technical</EM></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><EM>ELCB Information 
Services</EM></FONT></DIV>
<DIV align=left>&nbsp;</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

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