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
This is a multi-part message in MIME format. ------=_NextPart_000_0038_01BFAF8D.1AB23780 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_0038_01BFAF8D.1AB23780 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR></HEAD> <BODY> <DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr> </DIV> <DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D290241111-26042000>I have = got a=20 dialemma.Actually i am stupid not just to do it the traditional way but = i guess=20 i have my reasons.</SPAN></FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D290241111-26042000>It = goes like=20 this......</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN = class=3D290241111-26042000>I have root=20 setup to use csh shell. So everytime I login via root i get a csh=20 prompt.</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D290241111-26042000>I want = to leave it=20 at this because bash is a addon when you install to bsd and Incase my = box get=20 screwed up and the shell is not there i get locked out of root.Now I = want to=20 create a little script that calls up bash for root.For instance I want = to login=20 as root and type in "b"(b will be a file calling up bash and *here is = the=20 problem* it must run PS1=3D"[\u@\h \W]\\$ ").</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D290241111-26042000></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D290241111-26042000>Now = bash is a=20 programm in it's own that when i execute it, it will open a shell in a = shell,so=20 then the file contaning PS1=3Dblah will not run because there is a new = shell being=20 opend and the rest of the file is not being = executed.</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D290241111-26042000></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D290241111-26042000>Now = how do i get=20 PS1=3Dblah to export to the terminal?</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D290241111-26042000>I = tried to create a=20 .bash_profile and added the PS1=3Dblah into it and it does not=20 work.</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D290241111-26042000></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D290241111-26042000>So = what I am looking=20 for is for bash to reinhibit the enviroment once I execute the shell in = another=20 shell.</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D290241111-26042000>This = must also work=20 on a per user level not global.</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D290241111-26042000>HOW??</SPAN></FONT></DIV> <DIV> </DIV> <DIV align=3Dleft><FONT face=3DArial size=3D2>Thanx</FONT></DIV> <DIV align=3Dleft> </DIV> <DIV align=3Dleft><EM><FONT face=3DArial size=3D2>Marius = Vincent</FONT></EM></DIV> <DIV align=3Dleft><EM><FONT face=3DArial size=3D2></FONT></EM></DIV> <DIV align=3Dleft><FONT face=3DArial = size=3D2><EM>Technical</EM></FONT></DIV> <DIV align=3Dleft><FONT face=3DArial size=3D2><EM>ELCB Information=20 Services</EM></FONT></DIV> <DIV align=3Dleft> </DIV> <DIV> </DIV></BODY></HTML> ------=_NextPart_000_0038_01BFAF8D.1AB23780-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NEBBJNFFELDAHIBIGIAMMECBCBAA.mvincent>