sqlplus for linux with command line history and editing:
rlwrap is a 'readline wrapper', a small utility that uses the GNU
readline library to allow the editing of keyboard input for any
command (arrow keys, history, search with CTRL-R, command name completion with dictionary)
credits to
http://utopia.knoware.nl/~hlub/uck/rlwrap/
a compiled version of rlwrap 0.23 + readline 4.3 for RHEL 3 is added to this page:
- rlwrap-023: rlwrap 0-23 using readline 4.3, compiled and tested on RHEL ES3
rlwrap install instructions:
- Download rlwrap from this page (see below) and/or compile it from source
- Execute the following:
RLWRAPDIR=/usr/local/bin
sudo cp rlwrap-023 $RLWRAPDIR/rlwrap-023
echo "select" > rlwrap_dict
echo "from" >> rlwrap_dict
sudo cp rlwrap_dict $RLWRAPDIR/
Note: You can add more entries in the dictionary, sqlplus will use them as shortcuts (use the tab key to access them)
- Edit .bashrc and add the following aliases
RLWRAPDIR=/usr/local/bin
alias sqlp="rlwrap-023 -f $RLWRAPDIR/rlwrap_dict sqlplus"
alias sqlsys="rlwrap-023 -f $RLWRAPDIR/rlwrap_dict sqlplus / as sysdba"
- Reload the bash shell. The aliases sqlp and sqlsys can be used instead of sqlplus to use the command line history (arrow keys) with sqlplus.
rlwrap is referenced also in the installation procedure
Installation_verbose