sqlplus下移动光标和退格删除

转自:http://blog.itpub.net/7199859/viewspace-407069/

rlwrap工具可以解决linux下sqlplus 提供浏览历史命令行的功能,和删除先前输入错误的字母等问题

1.安装

需要readline包 这个安装光盘就有

[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 db42a60e
Preparing...                ########################################### [100%]
   1:libtermcap-devel       ########################################### [100%]
[root@asm RPMS]# rpm -Uvh readline*
warning: readline-4.3-13.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
        package readline-4.3-13 is already installed
[root@asm RPMS]# rpm -Uvh readline-devel-4.3-13.i386.rpm
warning: readline-devel-4.3-13.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
   1:readline-devel         ########################################### [100%]

安装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 <file>                  --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:
http://utopia.knoware.nl/~hlub/uck/rlwrap/

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

alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'

linux sqlplus 下就能和cmd  下sqlplus 正常操作了
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值