Linux 下如何 sql*plus 实现上下键历史记录显示(安装rlwrap 以及 readline)

2014-11-24 17:34:29 · 作者: · 浏览: 1

readline-6.2.tar.gz 软件包下载:


具体下载目录在 /2014年资料/1月/21日/Linux 下如何 sql&plus 实现上下键历史记录显示(安装rlwrap 以及 readline)


------------------------------------分割线------------------------------------


安装过程很简单,先readline再rlwrap


root用户:


tar -xzvf readline-6.2.tar.gz


cd readline-6.2


./configure


make


make install


rlwrap 过程相同


tar -xzvf rlwrap-0.37.tar.gz


cd rlwrap-0.37


./configure


make


make install


安装成功后再root用户下rlwrap 会有下面的结果


[root@rh56 ~]# rlwrap
Usage: rlwrap [options] command ...


Options:
-a[password:] --always-readline[=password:]
-A --ansi-colour-aware
-b --break-chars=
-c --complete-filenames
-C --command-name=
-D <0|1|2> --history-no-dupes=<0|1|2>
-f --file=
-g --forget-matching=
-h --help
-H --history-filename=
-i --case-insensitive
-I --pass-sigint-as-sigterm
-l --logfile=
-n --no-warnings
-N --no-children
-o --one-shot
-O --only-cook=
-p[colour] --prompt-colour[=colour]
-P --pre-given=
-q --quote-characters=
-m[newline substitute] --multi-line[=newline substitute]
-r --remember
-R --renice
-v --version
-s --histsize= (negative: readonly)
-S --substitute-prompt=
-t --set-term-name=
-w --wait-before-prompt= (msec, <0 : patient mode)
-z --filter=


bug reports, suggestions, updates:
http://utopia.knoware.nl/~hlub/uck/rlwrap/


其实不只是sql*plus可以受益,其他需要执行命令行的工具都可以受益。


alias s='rlwrap sqlplus / as sysdba'
alias adrci='rlwrap adrci'
alias ggsci='rlwrap /u01/gg/ggsci'
alias bbed='rlwrap $ORACLE_HOME/rdbms/lib/bbed parfile=/home/oracle/bbed/dex.par'
alias rman='rlwrap rman target /'


这样就结束了,自己试试吧。


相关阅读: