您的位置:首页 > 运维架构 > Linux

为SQLPLUS加上Linux命令行的功能

2014-01-04 21:49 483 查看
Linux命令行中,上下键能调出命令执行的历史,sqlplus却不行。rlwrap就是这样一个软件,能使sqlplus拥有linux命令行的功能

http://utopia.knoware.nl/~hlub/rlwrap/


rlwrap

rlwrap
 is a wrapper that uses the GNU
readline library to allow the editing of keyboard input for any other command. Input history is kept between invocations, separately for each command; history completion and search work as in 
bash
 and
completion word lists can be specified on the command line.

rlwrap
 compiles and runs on most Unix(-like) systems, including cygwin.

rlwrap-0.37.tar.gz (248 k)

manpage

README

CHANGES

用root用户登录

 wget http://utopia.knoware.nl/~hlub/rlwrap/rlwrap-0.37.tar.gz
 tar -zxvf rlwrap-0.37.tar.gz

cd rlwrap-0.37

yum -y install readline-devel

./configure && make && make install

cat >> ~oracle/.bash_profile << eof

alias sqlplus='rlwrap sqlplus'

alias rman='rlwrap rman'

alias rman='rlwrap lsnrctl'

eof

su - oracle

sqlplus / as sysdba

enjoy it!!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: