SETTING UP PDKSH

e.g. on Slackware Linux

SLACKWARE

/usr/sbin/slackpkg search ksh
/sbin/removepkg ksh93
/usr/sbin/slackpkg install pdksh
mv /bin/ksh /bin/ksh.trash
ln -s pdksh /bin/ksh
cat /etc/shells

chsh -s /bin/ksh root
useradd -D -s /bin/ksh

mkdir ~/.trash/
mv /etc/profile.d/modules.* ~/.trash/

At the end of e.g. /etc/profile,

export ENV=/etc/shrc

Check at login,

^V

SETUP

this setup is compatible with BASH, the only warning when running BASH may be about bind clear.

vi /etc/shrc #new file

case "$-" in *i*)
    ( set -o emacs 2>/dev/null ) && set -o emacs
    ( set -o tabcomplete 2>/dev/null ) && set -o tabcomplete
    bind -m '^L'='clear^M'

    [[ -z $HOST ]] && HOST=`uname -n`
    (( `id -u` == 0 )) && PS1='$HOST# ' || PS1='$HOST> '

    alias ll='ls -alhF'
    alias l='ls -altrhF'
    alias cp='cp -i'
    alias mv='mv -i'
    alias rm='rm -i'

    alias netstata='netstat -antupe --inet --inet6'
    alias runq='postfix flush'

    alias lynxg='lynx -accept_all_cookies google.com/ncr'
    alias lynx='lynx -accept_all_cookies'

    alias push='git nc && git push'
    alias stat='git diff --stat --cached origin/master'

    export TERM=xterm
    #export TERM=linux

    j=$((`grep ^processor /proc/cpuinfo | tail -1 | awk '{print $3}'` + 1))
    export MAKEFLAGS=-j$j
    unset j
    ;;
esac

apply,

. /etc/profile

RESOURCES