COHERENT manpages
This page displays the COHERENT manpage for .profile [Execute commands at login].
List of available manpages
Index
.profile -- System Administration Execute commands at login $HOME/.profile The shell reads file $HOME/.profile whenever a user logs in. The user can edit its contents to set up her environment however she prefers, and to execute programs routinely upon login. The following gives one user's .profile: MAIL=/usr/spool/mail/sally PATH=/usr/bin:/bin:/v/sally/bin:. EDITOR=me PS1="Sally(!) " PS2="MORE(!)> " PAGER=scat set -h set -o emacs echo "CALENDAR:" calendar echo "" /usr/games/fortune The first six entries set environmental variables; note that these are in addition to the variables set in /etc/profile. The next two entries set -h set -o emacs set two features of the Korn shell, which is used by the person. The first turns on its hashing feature, and the second turns on MicroEMACS-style editing of the command line. The last four entries echo "CALENDAR:" calendar echo "" /usr/games/fortune execute two programs upon login. The two echo commands print, respectively, the word CALENDAR and a blank line on the screen. The command calendar reads the user's personal calendar and prints all entries the relate to today (or to the weekend, should today be a Friday). The command fortune prints a randomly selected (and, we hope, amusing) select from file /usr/games/lib/fortunes. This example is relatively simple. A user's .profile can be turned into a complex shell program if you wish. See Also Administering COHERENT, ksh, .kshrc, profile, sh, Using COHERENT