安装rlwrap解决linux下sqlplus提供浏览历史命令行的功能
2012-06-27 04:26
656 查看
rlwrap工具可以解决linux下sqlplus提供浏览历史命令行的功能,和删除先前输入错误的字母等问题。
1、安装前准备工作:
安装rlwrap所需的rpm包,系统盘中自带。
[root@ORCL RedHat]# cd RPMS/
[root@ORCL RPMS]# rpm -Uvh readline*
warning: readline-4.3-13.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e //我的提示已经安装上了,包括
readline-devel-4.3-13.i386.rpmreadline-devel-4.3-13.i386.rpm
2、安装rlwrap包
# tar zxvf rlwrap-0.37.tar.gz && cd rlwrap-0.37
查看INSTALL文件,获取安装步骤,这样可以少走不少弯路。
# less INSTALL
# chmod 755 *
# ./configure
config.status: creating doc/rlwrap.man
config.status: creating config.h
config.status: executing depfiles commands
Now do:
make (or gmake) to build rlwrap
make check for instructions how to test it
make install to install it
[root@ORCL rlwrap-0.37]# make && make install
安装完成后执行 rlwrap
# rlwrap
Usage: rlwrap [options] command ...
Options:
-a[password:] --always-readline[=password:]
-A --ansi-colour-aware
-b <chars> --break-chars=<chars>
-c --complete-filenames
-C <name|N> --command-name=<name|N>
-D <0|1|2> --history-no-dupes=<0|1|2>
-f <completion list> --file=<completion list>
-g <regexp> --forget-matching=<regexp>
-h --help
-H <file> --history-filename=<file>
-i --case-insensitive
-I --pass-sigint-as-sigterm
-l <file> --logfile=<file>
-n --no-warnings
-N --no-children
-o --one-shot
-O <regexp> --only-cook=<regexp>
-p[colour] --prompt-colour[=colour]
-P <input> --pre-given=<input>
-q <chars> --quote-characters=<chars>
-m[newline substitute] --multi-line[=newline substitute]
-r --remember
-R --renice
-v --version
-s <N> --histsize=<N> (negative: readonly)
-S <prompt> --substitute-prompt=<prompt>
-t <name> --set-term-name=<name>
-w <N> --wait-before-prompt=<N> (msec, <0 : patient mode)
-z <filter command> --filter=<filter command>
bug reports, suggestions, updates:
http://utopia.knoware.nl/~hlub/uck/rlwrap/
# vi /home/oracle/.bash_profile
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
在网上查了不少资料,基本上都大同小异,有的基本上就是转抄过去的,也不知道做没做过测试,我这边试了几次,还是没有达到预期的目的,不知道是哪里的问题,纠结。。。
本文出自 “快乐生活快乐工作” 博客,请务必保留此出处http://lecui.blog.51cto.com/3345733/910135
1、安装前准备工作:
安装rlwrap所需的rpm包,系统盘中自带。
[root@ORCL RedHat]# cd RPMS/
[root@ORCL RPMS]# rpm -Uvh readline*
warning: readline-4.3-13.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e //我的提示已经安装上了,包括
readline-devel-4.3-13.i386.rpmreadline-devel-4.3-13.i386.rpm
2、安装rlwrap包
# tar zxvf rlwrap-0.37.tar.gz && cd rlwrap-0.37
查看INSTALL文件,获取安装步骤,这样可以少走不少弯路。
# less INSTALL
# chmod 755 *
# ./configure
config.status: creating doc/rlwrap.man
config.status: creating config.h
config.status: executing depfiles commands
Now do:
make (or gmake) to build rlwrap
make check for instructions how to test it
make install to install it
[root@ORCL rlwrap-0.37]# make && make install
安装完成后执行 rlwrap
# rlwrap
Usage: rlwrap [options] command ...
Options:
-a[password:] --always-readline[=password:]
-A --ansi-colour-aware
-b <chars> --break-chars=<chars>
-c --complete-filenames
-C <name|N> --command-name=<name|N>
-D <0|1|2> --history-no-dupes=<0|1|2>
-f <completion list> --file=<completion list>
-g <regexp> --forget-matching=<regexp>
-h --help
-H <file> --history-filename=<file>
-i --case-insensitive
-I --pass-sigint-as-sigterm
-l <file> --logfile=<file>
-n --no-warnings
-N --no-children
-o --one-shot
-O <regexp> --only-cook=<regexp>
-p[colour] --prompt-colour[=colour]
-P <input> --pre-given=<input>
-q <chars> --quote-characters=<chars>
-m[newline substitute] --multi-line[=newline substitute]
-r --remember
-R --renice
-v --version
-s <N> --histsize=<N> (negative: readonly)
-S <prompt> --substitute-prompt=<prompt>
-t <name> --set-term-name=<name>
-w <N> --wait-before-prompt=<N> (msec, <0 : patient mode)
-z <filter command> --filter=<filter command>
bug reports, suggestions, updates:
http://utopia.knoware.nl/~hlub/uck/rlwrap/
# vi /home/oracle/.bash_profile
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
在网上查了不少资料,基本上都大同小异,有的基本上就是转抄过去的,也不知道做没做过测试,我这边试了几次,还是没有达到预期的目的,不知道是哪里的问题,纠结。。。
本文出自 “快乐生活快乐工作” 博客,请务必保留此出处http://lecui.blog.51cto.com/3345733/910135
相关文章推荐
- rlwrap: command not found和解决linux下sqlplus 提供浏览历史命令行的功能
- 安装rlwrap解决oracle sqlplus命令行下找回历史命令,以及回退键,方向键不好使的问题
- 解决Linux下SQL*Plus命令行历史回调功能
- 利用uniread 解决 Linux下的SQL*Plus 命令行历史回调功能
- 解决Linux下Oracle SQL*Plus命令行历史回调功能
- 利用uniread 解决 Linux下的SQL*Plus 命令行历史回调功能
- 解决Linux下Oracle SQL*Plus命令行历史回调功能
- 利用uniread 解决 Linux下的SQL*Plus 命令行历史回调功能
- 利用Uniread 解决 Linux下的SQL*Plus 命令行历史回调功能
- [Oracle] 利用Uniread 解决 Linux下的SQL*Plus 命令行历史回调功能
- Linux 下如何 sql*plus 实现上下键历史记录显示(安装rlwrap 以及 readline)
- 使用rlwrap增强Linux中的sqlplus命令行功能
- 解决Linux下SQL*Plus历史回调功能
- 【转载】使用rlwrap增强Linux中的sqlplus命令行功能
- 利用uniread解决下的SQL*Plus命令行历史回调功能
- 解决Linux下SQL*Plus历史回调功能
- Linux中SQLPLUS上下键不能显示历史命令的问题/输入错误不能回退问题 rlwrap解决
- rlwrap linux sqlplus 调用历史命令
- 转:linux下sqlplus的历史sql回调功能实现方法
- sqlplus上下键浏览历史命令行