Korn Shell: Unix and Linux Programming Manual, Third Edition, The By Anatole Olczak
Table of Contents
This appendix contains a sample .profile file. Notice that the environment variables are set and exported with one typeset command. This speeds up processing of the .profile file.
## Sample .profile File## Set/export environment variablestypeset -x CDPATH=:$HOME:/usr/spool \EDITOR=vi \ENV=${HOME:-.}/.env \HISTFILE=$HOME/.history \HISTSIZE=200 \HOME=/home/anatole \LOGNAME=anatole \MAILCHECK=300 \MAILPATH=~/inbox:/usr/spool/mail/$LOGNAME \PAGER=$(whence more) \PATH=${PATH#:}:/usr/etc:$NEWS/bin: \PS1='!:$PWD> ' \PS4='[$LINENO]+ ' \SHELL=/bin/ksh \TERM=sun \TMOUT=600 \USER=$LOGNAME# Set global optionsset -o noclobber -o markdirs +o bgnice# Execute commands from the ~/.logout file on exittrap '. ~/.logout' EXIT