The frustration because of lack of command history in sqlplus (or RMAN) finally reached it’s limit. I just couldn’t stand it anymore so with help from google i found this post here which mentions rlwrap utility. rlwrap records history for all lines you enter into a specific program (in our case sqlplus).
To use rlwrap, you need to install readline libraries (below are the download links). First unpack readline and install it:
gunzip readline-6.0.tar.gz tar -xvf readline-6.0.tar cd readline-6.0 #to install to default directory ./configure #or if you want to install to a specific directory, like your home, use this one ./configure --prefix=$HOME make make install
Then do the same with rlwrap.
gunzip rlwrap-0.32.tar.gz tar -xvf rlwrap-0.32.tar cd rlwrap-0.32 #to install to default directory ./configure #or if you want to install to another directory, while $RLHOME is the path where you installed readline. ./configure --prefix=$HOME CFLAGS=-I$RLHOME/include CPPFLAGS=-I$RLHOME/include LDFLAGS=-L$RLHOME/lib make make install
And launch sqlplus (or rman, or any other utility like this)
rlwrap sqlplus
Download rlwrap from here: http://utopia.knoware.nl/~hlub/uck/rlwrap/
And readline from here: http://tiswww.case.edu/php/chet/readline/rltop.html