Solve the problem of garbled characters and spaces of sqlplus tools in oracle
The tool used here is rlwrap.
You can learn about http://utopia.knoware.nl/~hlub/uck/rlwrap/ at this link
Wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.42.tar.gz
Yum install-y readline readline-devel this is what it depends on.
Tar xf rlwrap-0.42.tar.gz
Cd rlwrap-0.42
Of course, you can check readme and install before compiling.
. / configure & & make & & make install
Then switch to the oracle user
Su-oracle
[oracle@oracle alert] $rlwrap sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Oct 18 09:13:15 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL > show user
USER is "SYS"
SQL > exit
For better combination, remove rlwrap and directly use sqlplus / as sysdba
So make an individual name in the home directory.
Echo "alias sqlplus='rlwrap sqlplus'" > > / home/oracle/.bash_profile
Source / home/oracle/.bash_profile
At this point, the work is done.