Description of example .profile file, Profile file – HP NonStop G-Series User Manual

Page 49

Advertising
background image

Display of messages to your workstation

The trap command

Command aliases

History variables

In the .profile file, an example of which is shown in

Example 1

, environment variables are set

and exported, and shell variables are set.

Table 10

explains each part of the file.

The values in the following example .profile file (and its description) may differ from the values
that are appropriate for your system and for your .profile file.

Example 1 .profile File

# Set environment variables
PATH=/bin:/usr/ucb
#PATH=/bin:/bin/unsupported:/usr/bin:/usr/ucb
MANPATH=/usr/share/man
ENV=$HOME/.profile
EDITOR=vi
FCEDIT=vi
PS1="'hostname' [!] $ "
TERM=xterm

# Export global variables
export PATH MANPATH ENV EDITOR FCEDIT PS1 TERM

# Set shell variables
set -o monitor
set -o trackall
set -o noclobber

# Set command aliases
alias rm='rm -i '
alias rename='mv '
alias h 'history !* | more'
alias l 'ls -l'
alias c clear

# Set history variables
HISTSIZE=40

# Set file creation permissions
umask 027

Table 10

describes each line of

Example 1

.

Table 10 Description of Example .profile File

Description

Line

Comment line.

# Set environment variables

Specifies the search path. In this case, /bin is searched first and
/usr/ucb

is searched second. Note: /usr/ucb contains the OSS

ftp client.

PATH=/bin:/usr/ucb

Comment line. Can be used to specify an alternate search path that
includes the unsupported utilities.

#PATH=/bin:/bin/unsupported:

/usr/bin:/usr/ucb

Specifies the search path for online reference pages (man pages).
The MANPATH variable can be used to specify paths to directories
containing different translations of MAN pages.

MANPATH=/usr/share/man

Specifies $HOME/.profile as the default shell environment.

ENV=$HOME/.profile

Example .profile File

49

Advertising
This manual is related to the following products: