O'Reilly logo

Korn Shell: Unix and Linux Programming Manual, Third Edition, The by Anatole Olczak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. Sample .profile File

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 variables
				typeset -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 options
				set -o noclobber -o markdirs +o bgnice
				# Execute commands from the ∼/.logout file on exit
				trap ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required