天天看點

rlwrap: command not found和解決linux下sqlplus 提供浏覽曆史指令行的功能

rlwrap工具可以解決linux下sqlplus 提供浏覽曆史指令行的功能,和删除先前輸入錯誤的字母等問題

1.安裝

需要readline包 這個安裝CD光牒就有

[root@asm redhat]# cd rpms/

[root@asm rpms]# rpm -uvh

readline*

warning: readline-4.3-13.i386.rpm: v3 dsa signature: nokey, key id

db42a60e

error: failed

dependencies:

        libtermcap-devel is

needed by readline-devel-4.3-13.i386

    suggested

resolutions:

/var/spool/up2datelibtermcap-devel-2.0.8-39.i386.rpm

[root@asm rpms]# rpm

-uvh libtermcap-devel-2.0.8-39.i386.rpm

warning:

libtermcap-devel-2.0.8-39.i386.rpm: v3 dsa signature: nokey, key id

preparing...               

########################################### [100%]

1:libtermcap-devel      

###########################################

[100%]

        package readline-4.3-13 is

already installed

readline-devel-4.3-13.i386.rpm

warning: readline-devel-4.3-13.i386.rpm: v3

dsa signature: nokey, key id

1:readline-devel        

安裝rlwrap包

rlwrap-0.28.tar.gz下載下傳位址:http://utopia.knoware.nl/~hlub/uck/rlwrap/

[root@asm oracle]# tar -zxvf rlwrap-0.28.tar.gz

[root@asm oracle]# cd

rlwrap-0.28

[root@asm rlwrap-0.28]# ls

aclocal.m4 

bash30-005.patch  changelog    config.h.in 

configure.ac  distribution  install     

makefile.in  readme  test 

tools

authors    

bugs             

completions  configure   

copying      

doc          

makefile.am  news        

src     todo

[root@asm rlwrap-0.28]#

./configure

[root@asm rlwrap-0.28]# make

[root@asm rlwrap-0.28]# make install

[root@asm rlwrap-0.28]# rlwrap

usage: rlwrap [options] command ...

options:

-a[password:]             

--always-readline[=password:]

  -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>

  -f <format

string>        

--history-format=<format string>

-h                        

--help

  -h

<file>                 

--history-filename=<file>

-i                        

--case-insensitive

  -l

--logfile=<file>

-n                        

--no-warnings

  -p

<input>                

--pre-given=<input>

  -m[newline

substitute]     --multi-line[=newline substitute]

-r                        

--remember

-v                        

--version

  -s

<n>                    

--histsize=<n> (negative: readonly)

bug reports, suggestions, updates:

[root@asm rlwrap-0.28]# vi /home/oracle/.bash_profile   加入下面兩句

alias sqlplus=‘rlwrap sqlplus‘

alias

rman=‘rlwrap rman‘

linux sqlplus 下就能和cmd  下sqlplus 正常操作了

繼續閱讀