今天在登陆数据库的时候使用!sql登录
[oracle@p520b ~]$ !sql
sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 20 10:40:07 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
SYS@gbps>
!sql 这个感叹号在shell中是直接调用history中执行过的命令,可以是数字,也可以是字符串, !sql就只引用最近以sql开头的命令
你把.bash_history清空再执行"!sql"就不行了