Sponsored Content
Top Forums UNIX for Dummies Questions & Answers .bash_profile versus .profile of user in Solaris 10 Post 302739963 by phunk on Wednesday 5th of December 2012 08:28:12 AM
Old 12-05-2012
Put your PS1 declaration in .profile.

Code:
#PS1='whateveryouwant'
PS1='${HOST}:${LOGNAME}:${PWD}'

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

CTRL+H versus ^? versus BACKSPACE

Hi Gurus! I recently got my shell account (HP UX v11) created by our sysadmin and am having problem deleting with the backspace key. After doing some reading, I believe I need to enter a custom "STTY..." statement in my profile. Can someone please help me with the correct "STTY" sequence... (3 Replies)
Discussion started by: alan
3 Replies

2. Shell Programming and Scripting

User profile

Sorry to I am not familiar with script writing , attach is the /etc/profile in my system , we have limit each user can only have one login in the system . When the user login , if the system found the user have a dead process in the system , the system will confirm the user to kill the previous... (1 Reply)
Discussion started by: ust
1 Replies

3. UNIX for Dummies Questions & Answers

Profile scripts versus rc scripts....

what is the difference between login and profile scripts versus the rc scripts? (1 Reply)
Discussion started by: rookie22
1 Replies

4. Infrastructure Monitoring

trap in etc/profile and user .profile

Hello I really wonder what's trap in etc/profile and in each user .profile. I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing. I want to know ... 1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Discussion started by: Smith
4 Replies

5. Solaris

Solaris versus Centos

hi guys In a few days I will be working in a new Job my new chief told I will be using Solaris and since I know Centos-Red Hat-Fedora I would like to know if Solaris is that different from Centos and my other linux Flavors... by the way any good solaris manual thanks a lot (1 Reply)
Discussion started by: karlochacon
1 Replies

6. UNIX for Advanced & Expert Users

bash_profile or .profile

Hi, happy new year. on AIX 6.1 , for user oracle , there are two files : bash_profile and .profile I do not know which one is executed when login ? How to know , More over in both of them we have : in .profile : ORACLE_HOME=/appli/oracle/product/10.2.0/db_1... (5 Replies)
Discussion started by: big123456
5 Replies

7. Shell Programming and Scripting

dot bash_profile for root user

Good evening everybody, I like to have my prompt like that : $ Therefore I had the line below in the .bash_profile file: PS1="\$" Now I would like to have something like that when I log as root : # and adding PS1="\#" is definitely not working... Any idea how to do that? Many... (4 Replies)
Discussion started by: freddie50
4 Replies

8. UNIX for Dummies Questions & Answers

Bash_profile versus bashrc

Hi All Please can you tell , what is the difference between bash_profile and bashrc. How to create them? (8 Replies)
Discussion started by: fretagi
8 Replies

9. Linux

Renaming .bash_profile to .profile

Hi Gurus, Recently we have migrated our servers from AIX to Linux. Most of the scripts written in AIX server are sourcing environment variables using .profile file. Now we have the following options: 1. Change all the scripts where ever .profile is being used and replace it with... (14 Replies)
Discussion started by: svajhala
14 Replies
aepromptcmd(1)															    aepromptcmd(1)

NAME
aepromptcmd - change prompt color by change state SYNOPSIS
PROMPT_COMMAND="aepromptcmd" DESCRIPTION
The bash(1) shell has an interesting property: If the PROMPT_COMMAND vaiable is set, the value is executed as a command prior to issuing each primary prompt. (Actually, it can be a seties of semicolon separated commands.) In order to change the text back to normal, the PS1 variable needs to have "33[0m" somewhere near the end, otherwise things can get a little difficult to read. If you are using bash(1), you need to let it know these are unprintable (like this: "[33[0m]") or it messes up command line editing. The aepromptcmd command is used to set the color of the prompt, based on the state of the current change. This is an idea taken from Kent Beck's Test Driven Development book. If the change is in the being developed or being integrated state and it needs to be built, the prompt is red; if it is built but it needs to be tested, the prompt is magenta, otherwise it is green. Example Here is a short script you can put in your .bashrc file to turn on prompt coloring: if [ "$PS1" ] then case "$PROMPT_COMMAND" in "" ) PROMPT_COMMAND="aepromptcmd" PS1="$PS1^[[0m" ;; *aepromptcmd*) ;; *) PROMPT_COMMAND="$PROMPT_COMMAND;aepromptcmd" PS1="$PS1[33[0m]" ;; esac export PROMPT_COMMAND export PS1 fi Note that this usually leaves your prompt default (black) when you are not somewhere inside a development directory. Limitations The aepromptcmd command uses the ANSI color escape sequences. It really should to use the tigetstr(3) function from terminfo(3) to do this in a terminal independent way. Code contributions welcome. OPTIONS
The following options are understood: -Change number This option may be used to specify a particular change within a project. See aegis(1) for a complete description of this option. -Project name This option may be used to select the project of interest. When no -Project option is specified, the AEGIS_PROJECT environment variable is consulted. If that does not exist, the user's $HOME/.aegisrc file is examined for a default project field (see aeu- conf(5) for more information). If that does not exist, when the user is only working on changes within a single project, the project name defaults to that project. Otherwise, it is an error. -Help This option may be used to obtain more information about how to use the aepromptcmd program. -Verbose By default error messages are supressed, so that the prompt will be normal when you are outside an Aegis work area. Use this option to tuen error messages back on. See also aegis(1) for options common to all aegis commands. All options may be abbreviated; the abbreviation is documented as the upper case letters, all lower case letters and underscores (_) are optional. You must use consecutive sequences of optional letters. All options are case insensitive, you may type them in upper case or lower case or a combination of both, case is not important. For example: the arguments "-project, "-PROJ" and "-p" are all interpreted to mean the -Project option. The argument "-prj" will not be understood, because consecutive optional characters were not supplied. Options and other command line arguments may be mixed arbitrarily on the command line, after the function selectors. The GNU long option names are understood. Since all option names for aepromptcmd are long, this means ignoring the extra leading '-'. The "--option=value" convention is also understood. EXIT STATUS
The aepromptcmd command will exit with a status of 1 on any error. The aepromptcmd command will only exit with a status of 0 if there are no errors. ENVIRONMENT VARIABLES
See aegis(1) for a list of environment variables which may affect this command. See aepconf(5) for the project configuration file's project_specific field for how to set environment variables for all commands executed by Aegis. COPYRIGHT
aepromptcmd version 4.24.3.D001 Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Peter Miller The aepromptcmd program comes with ABSOLUTELY NO WARRANTY; for details use the 'aepromptcmd -VERSion License' command. This is free soft- ware and you are welcome to redistribute it under certain conditions; for details use the 'aepromptcmd -VERSion License' command. AUTHOR
Peter Miller E-Mail: millerp@canb.auug.org.au //* WWW: http://www.canb.auug.org.au/~millerp/ Reference Manual Aegis aepromptcmd(1)
All times are GMT -4. The time now is 03:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy