Saturday, 5 April 2008


rlwrap is a Linux command which provides line editing, persistent history and word completion for command line tools such as sqlplus and rman.

Simply type rlwrap before your command as follows.
rlwrap sqlplus scott/tiger
Now you can use the up and down arrow keys to retrieve your history, even across invocations of the command. You can also edit the line using the left and right keys, deleting and inserting text as required.

The -c option enables file completion which can be useful when running scripts. If you type @ and the start of a file name and press tab, rlwrap will complete the name of the file for you.

You can also specify a file containing your own list of words to be auto-completed.
rlwrap -c -f mywordlist.txt sqlplus scott/tiger
This file could contain a list of tables and views in your schema, for example.

No comments: