Translate page: (de-en)- Neuigkeiten

Benutzerkonfiguration

.profile - .kshrc - .kshexit

.profile

# execute logout script when terminating sesseon for cleanup

trap '$HOME/.kshexit' EXIT

# ignore CTRL-D when in login shell

set -o ignoreeof

# pointer to environment file

export ENV=$HOME/.kshrc

PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.

export PATH

# get local nodename for the prompt

export NODE=`hostname -s`

# set a prompt which shows the returncode of the last command, the

# machine name, current directory and the command history count

export PS1='($?)$NODE:$PWD !$ '

# set window title dynamically

case "$TERM" in

xterm*|aixterm*)

TITLE_COMMAND="\033]0;${NODE}\007"

print $TITLE_COMMAND

;;

*)

;;

esac

# command line editing

export VISUAL=vi

set the default editor

export EDITOR=/usr/bin/vi

# set the editor for fullscreen command editing

export FCEDIT=$EDITOR

# the default pager

export PAGER=/usr/bin/more

# number of commands in the command history

export HISTSIZE=200

if [ -s "$MAIL" ] # This is at Shell startup. In normal

then echo "$MAILMSG" # operation, the Shell checks

fi # periodically.

.kshrc

# ksh startup file

# check for interactive usage

case $- in

*i*) # Options for interactive shells

# each terminal should have it's own history file, so get rid of

# the file name and the next shell will create a new one.

rm -f $HOME/.sh_history

# Show where I am in the window title

if [ -n "$WINDOWID" -a -n "$NODE" ]

then

if [ "$TERM" = "aixterm" ]

then

echo "\033]P$USER@NODE: $PWD\007\c"

elif [ "$TERM" = "xterm" ]

then

echo "\033]2;$USER@$NODE: $PWD\007\c"

fi

fi

# some aliases to make life easier

alias cls='tput clear'

alias j=jobs

;; # end -- options for interactive shells

*) : ;; # no default

esac # End of case for interactive shells

.kshexit

# my logout file - clean up smit and other logs

rm -f $HOME/smit.*