|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#8
|
||||
|
||||
|
Is the below files exist in the below condition or not , and is it /etc/bashrc or /etc/.bashrc
if [ -f /etc/bashrc ]; then . /etc/bashrc fi and if exist kindly submit cat /etc/bashrc |
| Sponsored Links | ||
|
|
|
#9
|
||||
|
||||
|
Quote:
|
|
#10
|
||||
|
||||
|
Dear scottn
I checked .bash_profile it is not set.
this is my .bash_profile ........................................................................... # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH unset USERNAME ............................................................................. still i have the same prompt ![]() ---------- Post updated at 08:25 PM ---------- Previous update was at 08:22 PM ---------- Quote:
does not exists. |
|
#11
|
||||
|
||||
|
Try putting the PS1=... at the end of your .bashrc script?
|
|
#12
|
||||
|
||||
|
I got it.
Thanks to all of u.
i commented few lines in bashrc now i am getting my desired prompt. ---------------------------------------------------------------------------------------------------- #if [ -f /etc/bashrc ]; then # . /etc/bashrc #fi #if [ -f /etc/bash.bashrc ]; then # . /etc/bash.bashrc #fi ---------------------------------------------------------------------------------------------------- But still i have a question What is the need of bashrc in /etc/ ? means what is the role ? ![]() |
|
#13
|
||||
|
||||
|
you are using the file /etc/.bashrc not the one in your home as the ~/.bashrc is saying and I asked you if /etc/.bashrc is exist or not and I didn't get the answer yet (kindly note the "." before the word bashrc) your ~/.bashrc is excuting the code /etc/.bashrc when you login.(not good) when your ~/.bashrc is removed you need to modify your ".bash.profile" in a way that is to use the /etc/.bashrc when you lose your ~/.bashrc (somehow) kindly see below:- Code:
add this condition to your .bashrc.profile and remove it from your ~/.bashrc:- if [ -f $HOME/.bashrc ]; then . $HOME/.bashrc else . /etc/.bashrc fi |
|
#14
|
||||
|
||||
|
thanks ahmad.diab.
I made modifications in my .bash_profile.
![]() |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Where to change the UNIX password prompt? | DrivesMeCrazy | UNIX for Dummies Questions & Answers | 0 | 05-05-2009 04:12 AM |
| Change root prompt (Solaris) | RobertSubnet | UNIX for Dummies Questions & Answers | 10 | 01-02-2009 04:00 PM |
| How to change prompt | drogram | UNIX for Dummies Questions & Answers | 4 | 04-28-2008 11:48 AM |
| customize my prompt in bash | yankee428 | UNIX for Dummies Questions & Answers | 2 | 06-23-2005 02:02 PM |
| script to change shell and prompt | SHYAM | Shell Programming and Scripting | 1 | 06-27-2004 08:46 AM |