Operating System - HP-UX
1753359 Members
4933 Online
108792 Solutions
New Discussion юеВ

Re: .profile file setting

 
Mallikarjun B
Occasional Advisor

.profile file setting

Hi,
I need to set an entry in .profile file for PS1 which should show me the login prompt like username@hostname:PWD in colour. I tried with PS1="`whoami`@`hostname`:\$PWD\>" but i am not able to see in colours. I tried with
\033[1;43m text \033[0m but not able to see. Please help me.

Thanks in Advance.
8 REPLIES 8
Dennis Handly
Acclaimed Contributor

Re: .profile file setting

What type of terminal or terminal emulator do you have?
What colors do you want?
Mallikarjun B
Occasional Advisor

Re: .profile file setting

Hi I am using TERM=xterm and want display any colours.


Tx
Dennis Handly
Acclaimed Contributor

Re: .profile file setting

That string works fine for me, yellowish.
What shell and OS version are you using?
Mallikarjun B
Occasional Advisor

Re: .profile file setting

I am using HP-UX 11.31 and i tried it for k shell bash shell. i do echo to this can also see what you can. But to set in profile file i cant use echo.

Tx
Dennis Handly
Acclaimed Contributor

Re: .profile file setting

>I am using HP-UX 11.31

Any reason you are in the wrong forum? I'll ask the moderators to move it.

>But to set in profile file I can't use echo.

Can't use echo why? Because you only want to set PS1?
Mallikarjun B
Occasional Advisor

Re: .profile file setting

can u pls send me the PS1=root@hostname:PWD format in colour so that i wil try here...
singh sanjeev
Trusted Contributor

Re: .profile file setting

please try this:

echo -e "\\033[1;43m text \\033[0m " ;
Sanjeev Singh
James R. Ferguson
Acclaimed Contributor

Re: .profile file setting

Hi:

Have a look at this thread:

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=16960

Regards!

...JRF...