rlwrap + sqlplus
RLWRAP is one of those low profile tools that are really appreciated when you realize that you’re working on the server/workstation that don’t have them installed. On Windows OS, cmdhere is one such tool that is installed as soon as I logon more than once or twice on the same box. I think rlwrap is one such tool that should be installed on every Linux box – especially if you’re an Oracle DBA/developer working on command line with classic tools, such as sqlplus.
I’m not really spending that much time on Linux command line, but when I do, it’s almost always with Oracle sqlplus and I hate the fact that I could not retrieve previous command(s) by simply pressing the Up arrow key in a way that I’m used to do on Windows command prompt. Thanks to Catherine Devlin presentation I found out about rlwrap – elegant “workaround” (not that this tool is that new, on contrary nowadays it’s really an oldie – it’s just that I was not aware of it; you’ll find plenty of other posts out there on blogosphere – this note is solely for my own bookkeeping!). All we need to do is to install rlwrap that will handle command line history for tools such as sqlplus, rman etc.
After you download rlwrap from: http://utopia.knoware.nl/~hlub/uck/rlwrap/, you can install the tool as root with familiar steps:
# gunzip rlwrap-0.30.tar.gz # tar -xvf rlwrap-0.30.tar # cd rlwrap-0.30 # ./configure # make install
All you need to do is to run sqlplus or rman with read line wrapper:
$ rlwrap sqlplus /nolog or $ rlwrap rman target / nocatalog
Posted on 23.07.2008, in Linux, PostgreSQL, etc. and tagged Linux. Bookmark the permalink. 1 Comment.
rlwrap on OEL 6.1 (x64)
$ cd ~/Downloads
$ wget http://utopia.knoware.nl/~hlub/rlwrap/rlwrap-0.37.tar.gz
$ tar xzvf rlwrap-0.37.tar.gz
$ cd rlwrap-0.37
$ sudo yum install readline-devel*
$ sudo ./configure
$ sudo make
$ sudo make install