HPE GreenLake Administration
Operating System - HP-UX
1829594
Members
1614
Online
109992
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2007 02:32 AM
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2007 02:38 AM
12-18-2007 02:38 AM
Solution
hi indrajit
if you are using bash
fallowing url may help you
http://www.unix.com/unix-dummies-questions-answers/46793-colors-prompt-ps1.html
Hasan.
if you are using bash
fallowing url may help you
http://www.unix.com/unix-dummies-questions-answers/46793-colors-prompt-ps1.html
Hasan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2007 02:44 AM
12-18-2007 02:44 AM
Re: Prompt
IMHO you should invest your time in reviewing your older threads - your profile shows
"...have assigned points to 151 of 490 responses to my questions...".
No offense
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
"...have assigned points to 151 of 490 responses to my questions...".
No offense
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2007 02:52 AM
12-18-2007 02:52 AM
Re: Prompt
http://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/
this link gonna explain u all.
BR,
Kapil
this link gonna explain u all.
BR,
Kapil
I am in this small bowl, I wane see the real world......
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2007 03:17 AM
12-18-2007 03:17 AM
Re: Prompt
That depends on what you're using to view the prompt with. The terminal (or the terminal emulator program) can limit your choices: for example, if you're using an old greenscreen terminal, your options are basically limited to black-on-green or green-on-black. There might be a way to make your prompt brighter or dimmer than regular text, but that's about it.
You must find out the necessary terminal control character sequences for your terminal type and embed them to the environment variable that determines the prompt string (in POSIX shells, the primary prompt is defined by the $PS1 variable).
There is one problem: different types of terminals require different control sequences to do the same things. Because of this, embedding raw control sequences is a bad idea.
Using a control sequence that is not correct for your terminal type may just cause some garbage characters to be displayed... or it might cause something unexpected to happen, like clearing your screen. If that happens each time the prompt appears, using the shell will be somewhat difficult.
Instead, you should first make sure that your $TERM environment variable is set up correctly and then use the command "tput" to generate the correct control sequences for your terminal type.
See "man 4 terminfo" to know more about all the possible terminal capabilities, and use the command "untic $TERM" to see what capabilities are known for your currently-selected terminal type.
The standard prompt is defined as
PS1='$ '
Making it bold should work for many terminals:
PS1=$(tput bold)'$ '$(tput sgr0)
MK
You must find out the necessary terminal control character sequences for your terminal type and embed them to the environment variable that determines the prompt string (in POSIX shells, the primary prompt is defined by the $PS1 variable).
There is one problem: different types of terminals require different control sequences to do the same things. Because of this, embedding raw control sequences is a bad idea.
Using a control sequence that is not correct for your terminal type may just cause some garbage characters to be displayed... or it might cause something unexpected to happen, like clearing your screen. If that happens each time the prompt appears, using the shell will be somewhat difficult.
Instead, you should first make sure that your $TERM environment variable is set up correctly and then use the command "tput" to generate the correct control sequences for your terminal type.
See "man 4 terminfo" to know more about all the possible terminal capabilities, and use the command "untic $TERM" to see what capabilities are known for your currently-selected terminal type.
The standard prompt is defined as
PS1='$ '
Making it bold should work for many terminals:
PS1=$(tput bold)'$ '$(tput sgr0)
MK
MK
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP