交互式输入

[[email protected] ~]# ntpq
ntpq> peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+gus.buptnet.edu 202.112.10.60    3 u   17   64  377   88.144   32.547   5.601
+ntp.verd.co.id  202.162.32.12    3 u   85   64  336  209.770    4.300 167.134
*ktdns.cdnetwork 131.107.13.100   2 u   10   64  377   70.834   33.196  20.738
ntpq> ?
ntpq commands:
:config          delay            mreadvar         readlist
addvars          exit             mrl              readvar
associations     help             mrv              rl
authenticate     host             ntpversion       rmvars
ntpq> q
[[email protected] ~]#

[[email protected] ~]# sqlite3
SQLite version 3.6.20
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .help
.backup ?DB? FILE      Backup DB (default "main") to FILE
.bail ON|OFF           Stop after hitting an error.  Default OFF
.databases             List names and files of attached databases
.dump ?TABLE? ...      Dump the database in an SQL text format
sqlite> .quit
[[email protected] ~]#

[[email protected]84-monitor ~]# mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1119677
Server version: 5.1.73 Source distribution
mysql> ?
mysql> quit
Bye
[[email protected]84-monitor ~]#

-bash-3.2$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Thu Feb 26 15:17:18 2015

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, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> ?

 HELP
 ----

 Accesses this command line help system. Enter HELP INDEX or ? INDEX
 for a list of topics.

 You can view SQL*Plus resources at
     http://www.oracle.com/technology/tech/sql_plus/
 and the Oracle Database Library at
     http://www.oracle.com/technology/documentation/

 HELP|? [topic]

SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
-bash-3.2$

[[email protected]84-monitor ~]# php -a
Interactive shell

php >
php > b    tab两次
BadFunctionCallException  BadMethodCallException    base64_decode             base64_encode             base_convert              basename
bin2hex                   bind_textdomain_codeset   bindec                    bindtextdomain            bzclose                   bzcompress
bzdecompress              bzerrno                   bzerror                   bzerrstr                  bzflush                   bzread
bzwrite                   bzopen
php > b
php > quit
[[email protected]84-monitor ~]#

[[email protected]84-monitor ~]# python
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help
Type help() for interactive help, or help(object) for help about object.
>>> help()

Welcome to Python 2.6!  This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://docs.python.org/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics".  Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".

help> q

You are now leaving help and returning to the Python interpreter.
If you want to ask for help on a particular object directly from the
interpreter, you can type "help(object)".  Executing "help(‘string‘)"
has the same effect as typing a particular string at the help> prompt.
>>> exit()
[[email protected]84-monitor ~]#
时间: 2024-10-15 05:28:14

交互式输入的相关文章

expect实现交互式输入

一.用expect实现交互式输入 #!/usr/bin/expect -fset LUKS_passphrase xxxx123set Verify_passphrase xxxx123spawn cryptsetup luksFormat /dev/vdb1 expect "Are you sure? (Type uppercase yes):"set timeout 5send "YES\r" expect "Enter LUKS passphrase

[Mac]Terminal交互式输入行编辑

*:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } a { color: #4183C4; } a.absent { color: #cc0000; } a.anchor { display: block; padding-left: 30px; margin-left: -30px; cursor: pointer; position: absolute

第十四课时之交互式输入行编辑历史回溯

13.交互式输入行编辑历史回溯 某些版本的 Python 解释器支持编辑当前的输入行和历史记录,类似于在 Korn shell 和 GNU Bash shell 中看到的功能.这是使用 GNU Readline 库实现的,它支持各种编辑风格. 这个库有它自己的文档,在这里我们不就重复了 13.1. Tab 补全和历史记录 变量和模块名的补全在解释器启动时 自动打开 以便 Tab 键调用补全功能:它会查看Python语句的名字,当前局部变量以及可以访问的模块名.对于点分表达式如 string.a,

交互式输入编辑与历史命令补全

1.行编辑 如果支持,在交互式命令输入中,当前行可以使用以下的快捷键进行编辑: Ctrl+A:将光标移动到行开始位置 Ctrl+E:将光标移动到行结束位置 Ctrl+B:将光标往左移动一个位置 Ctrl+F:将光标往右移动一个位置 Backspace擦除光标左边的一个字符 Ctrl+D:擦除光标右侧一个字符 Ctrl+K:擦除光标右侧所有字符 2.历史命令补全 历史命令补全工作原理如下:将所有从命令行中输入的非空行保存在历史缓存中,当你在新的一行中输入命令 时,使用Ctrl+p输入历史命令中的上

2014马哥Linux0218-1字符测试与生成交互式选项表的脚本代码

0218课里,先是一个简单的小程序,注意字符测试的使用,建议所有被测试的字符都要加引号,而在字符测试匹配模式(也可以使正则表达式)的时候,需要用双中括号,题目如下: 练习:判定所有用户是否拥有可登陆shell #!/bin/bash for userName in `cut -d: -f1 /etc/passwd`;do if [[ `grep "^$userName\>" /etc/passwd | cut -d: -f7` =~ sh$ ]]; then echo "

sshpass 使Linux可以明文参数输入SSH密码

1. sshpass安装1 2. sshpass的参数1 3. sshpass的使用2 这几天配置一台服务器,在某云平台创建云服务器后,生成了巨长.巨复杂的一串密码,在输入几十次密码后,依然是密码错误.这时候就想如果密码是非交互式输入,可以将密码做为参数或从文件输入就太好了.sshpass就是一款密码输入辅助工具,它可以从命令行明文参数.文件或环境变量中指定密码,从而避免交互式密码输入. l sshpass的安装 l sshpass的参数 l sshpass的使用 1. sshpass安装 首先

输入、过滤和输出——PowerShell三分钟(八)

今天的三分钟给大家归纳一下PowerShell日常对数据的输入过滤和输出的处理 PowerShell输入数据的方式有很多种,包括直接输入字符.导入数据.捕获界面输入等 对于较少的信息,可以直接手工在PowerShell界面中输入: 这种方式很常见,对于需求信息较少的查询和操作非常方便 除此之外,还有Read-Host用于交互式输入: 由于是交互式输入,多用于必须用户干预的脚本 如果涉及到大量数据的输入,则需要用到Get-Content 首先准备一个txt,每一行都是需要输入的数据 通过Get-C

Expect 自动交互式程序

1. Expect 自动交互式程序介绍及安装 1.1 Expect 介绍 Expect 是一个用来实现自动化交互功能的软件套件. 1.2 为什么使用 Expect 在现今的企业运维中,自动化运维已经成为运维的主流趋势,但是在很多情况下,执行系统命令或程序时,系统会以交互式的形式要求运维人员输入指定的字符串,之后才能继续执行命令.例如: ① 为用户设置密码时,一般情况下就需要手工输入两次密码 ② 使用 SSH 远程连接服务时,第一次连接要和系统实现两次交互式输入: 简单地说,Expect 就是用来

Linux发邮件之mail

1.安装 (需要sendmail或postfix服务) sendmail     # yum install sendmail      # systemctl start sendmail.service     # systemctl status sendmail.service postfix     # yum install mailx     # systemctl start postfix.service     # systemctl status postfix.servi