免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3894 | 回复: 10
打印 上一主题 下一主题

偶也来送分,先到先得(12):bourne shell中的光标 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-04-14 16:43 |只看该作者 |倒序浏览
12可用积分
who can tell me:how to move cursor in bourne shell in which the up/down/left/right key is unuserable




没人搞定偶就用马甲来领分

[ 本帖最后由 yuhuohu 于 2008-4-14 16:50 编辑 ]

最佳答案

查看完整内容

In Bourne shell, you only can type in commands, and then hit .You can not move the cursor up/down.[ 本帖最后由 yuhuohu 于 2008-5-4 08:20 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-04-14 16:43 |只看该作者
原帖由 yuhuohu 于 2008-4-14 16:43 发表
who can tell me:how to move cursor in bourne shell in which the up/down/left/right key is unuserable


In Bourne shell, you only can type in commands, and then hit <Enter>.
You can not move the cursor up/down.


原帖由 twlogin 于 2008-4-15 15:04 发表


CTRL 键相关的快捷键:
Ctrl + a - Jump to the start of the line
Ctrl + b - Move back a char
Ctrl + c - Terminate the command  //用的最多了吧?
Ctrl + d - Delete from under the cursor
Ctrl + e - Jump to the end of the line
Ctrl + f - Move forward a char
Ctrl + k - Delete to EOL
Ctrl + l - Clear the screen  //清屏,类似 clear 命令
Ctrl + r - Search the history backwards  //查找历史命令
Ctrl + R - Search the history backwards with multi occurrence
Ctrl + u - Delete backward from cursor // 密码输入错误的时候比较有用
Ctrl + xx - Move between EOL and current cursor position
Ctrl + x @ - Show possible hostname completions
Ctrl + z - Suspend/ Stop the command
补充:
Ctrl + h - 删除当前字符
Ctrl + w - 删除最后输入的单词 ALT 键相关的快捷键:
平时很少用。有些和远程登陆工具冲突。
Alt + < - Move to the first line in the history
Alt + > - Move to the last line in the history
Alt + ? - Show current completion list
Alt + * - Insert all possible completions
Alt + / - Attempt to complete filename
Alt + . - Yank last argument to previous command
Alt + b - Move backward
Alt + c - Capitalize the word
Alt + d - Delete word
Alt + f - Move forward
Alt + l - Make word lowercase
Alt + n - Search the history forwards non-incremental
Alt + p - Search the history backwards non-incremental
Alt + r - Recall command
Alt + t - Move words around
Alt + u - Make word uppercase
Alt + back-space - Delete backward from cursor // SecureCRT 如果没有配置好,这个就很管用了。其他特定的键绑定:
输入 bind -P 可以查看所有的键盘绑定。这一系列我觉得更为实用。
Here "2T" means Press TAB twice
$ 2T - All available commands(common) //命令行补全,我认为是 Bash 最好用的一点
$ (string)2T - All available commands starting with (string)
$ /2T - Entire directory structure including Hidden one
$ ./2T - Only Sub Dirs inside including Hidden one
$ *2T - Only Sub Dirs inside without Hidden one
$ ~2T - All Present Users on system from "/etc/passwd" //第一次见到,很好用
$ $2T - All Sys variables //写Shell脚本的时候很实用
$ @2T - Entries from "/etc/hosts"  //第一次见到
$ =2T - Output like ls or dir //好像还不如 ls 快捷
补充:
Esc + T - 交换光标前面的两个单词

[ 本帖最后由 yuhuohu 于 2008-5-4 08:20 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2008-04-14 17:30 |只看该作者
抢个沙发等着看答案,

论坛徽章:
0
4 [报告]
发表于 2008-04-15 15:04 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
5 [报告]
发表于 2008-04-15 15:14 |只看该作者
LS的兄弟给的好好,多谢

可好像是BASH的吧,不是Bourne shell啊

论坛徽章:
0
6 [报告]
发表于 2008-04-15 20:50 |只看该作者
原帖由 yuhuohu 于 2008-4-15 15:14 发表
LS的兄弟给的好好,多谢

可好像是BASH的吧,不是Bourne shell啊

“Bourne shell是由AT&T开发的Unix shell(命令执行程序,通常也被称为命令接口)。由开发者Stephen Bourne的名字命名。Bourne shell是我们熟知的方便编程的sh,使用符号$来表示shell提示符。在Bourne shell家族中有Bourne,korn shell,bash和zsh。  

Bourne Again Shell即bash是Linux系统中发行的免费Bourne shell版本。Bash和最初的shell相似,还增加了命令行编辑的功能。有些人也称它为Hell来说明此shell不太容易被掌握。  

Zsh是Paul Falstad开发的,用来代替Bourne和C shell。它的特点是综合了所有其他shell的优点(自动补全文件名和快速查询历史命令)。Zsh被认为与Korn shell相似。Falstad有意把zsh做成一个方便用户将命令写入程序的shell并能执行该程序得到他们所期望的结果。因此Zsh深受Linux高级用户的喜爱。  

Bourne shell与Korn shell和C shell齐名是使用最广泛的三个shell。”
楼主的说法有问题哦!!!

论坛徽章:
0
7 [报告]
发表于 2008-04-15 21:01 |只看该作者
原帖由 luren04 于 2008-4-15 20:50 发表

“Bourne shell是由AT&T开发的Unix shell(命令执行程序,通常也被称为命令接口)。由开发者Stephen Bourne的名字命名。Bourne shell是我们熟知的方便编程的sh,使用符号$来表示shell提示符。在Bourne shell家 ...


no问题啊,solaris默认的shell是bourne shell,通常叫sh,or bsh,linux默认的shell是bash。bash从bsh而来但二者确实不同

[ 本帖最后由 yuhuohu 于 2008-4-15 21:02 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2008-04-18 08:07 |只看该作者
原帖由 susbin 于 2008-4-18 05:22 发表


In Bourne shell, you only can type in commands, and then hit .
You can not move the cursor up/down.



莫非这就是传说中的最佳答案?

论坛徽章:
0
9 [报告]
发表于 2008-04-18 11:49 |只看该作者
火狐兄,不会你也不知道答案?????

论坛徽章:
0
10 [报告]
发表于 2008-04-18 13:33 |只看该作者
原帖由 风之幻想 于 2008-4-18 11:49 发表
火狐兄,不会你也不知道答案?????



掩面而过

[ 本帖最后由 yuhuohu 于 2008-4-18 18:34 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP