免费注册 查看新帖 |

Chinaunix

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

问问这是个什么用法? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-08-13 11:29 |只看该作者 |倒序浏览
!:0 !:*

论坛徽章:
23
15-16赛季CBA联赛之吉林
日期:2017-12-21 16:39:27白羊座
日期:2014-10-27 11:14:37申猴
日期:2014-10-23 08:36:23金牛座
日期:2014-09-30 08:26:49午马
日期:2014-09-29 09:40:16射手座
日期:2014-11-25 08:56:112015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:49:0315-16赛季CBA联赛之山东
日期:2017-12-21 16:39:1915-16赛季CBA联赛之广东
日期:2016-01-19 13:33:372015亚冠之山东鲁能
日期:2015-10-13 09:39:062015亚冠之西悉尼流浪者
日期:2015-09-21 08:27:57
2 [报告]
发表于 2008-08-13 11:31 |只看该作者
原帖由 hwxo 于 2008-8-13 11:29 发表
!:0 !:*


断章取义,无可奉告。

论坛徽章:
0
3 [报告]
发表于 2008-08-13 11:33 |只看该作者
没有的,直接输入这个,会有输出的。

论坛徽章:
0
4 [报告]
发表于 2008-08-13 11:38 |只看该作者
[root@monitor perltest]# echo 111 323  543 4
111 323 543 4
[root@monitor perltest]# !:0 !:*
echo 111 323 543 4
111 323 543 4

论坛徽章:
0
5 [报告]
发表于 2008-08-13 11:39 |只看该作者
[root@monitor perltest]# echo 111 323  543 4
111 323 543 4
[root@monitor perltest]# !:2-3:p
323 543


怪怪的。

论坛徽章:
23
15-16赛季CBA联赛之吉林
日期:2017-12-21 16:39:27白羊座
日期:2014-10-27 11:14:37申猴
日期:2014-10-23 08:36:23金牛座
日期:2014-09-30 08:26:49午马
日期:2014-09-29 09:40:16射手座
日期:2014-11-25 08:56:112015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:49:0315-16赛季CBA联赛之山东
日期:2017-12-21 16:39:1915-16赛季CBA联赛之广东
日期:2016-01-19 13:33:372015亚冠之山东鲁能
日期:2015-10-13 09:39:062015亚冠之西悉尼流浪者
日期:2015-09-21 08:27:57
6 [报告]
发表于 2008-08-13 11:41 |只看该作者
原帖由 hwxo 于 2008-8-13 11:39 发表
[root@monitor perltest]# echo 111 323  543 4
111 323 543 4
[root@monitor perltest]# !:2-3:p
323 543


怪怪的。


man bash

       !      Start  a  history substitution, except when followed by a blank,
              newline, = or (.
       !n     Refer to command line n.
       !-n    Refer to the current command line minus n.
       !!     Refer to the previous command.  This is a synonym for `!-1'.
       !string
              Refer to the most recent command starting with string.
       !?string[?]
              Refer to the most recent command containing string.  The  trail-
              ing ? may be omitted if string is followed immediately by a new-
              line.
       ^string1^string2^
              Quick substitution.  Repeat the last command, replacing  string1
              with string2.  Equivalent to ``!!:s/string1/string2/'' (see Mod-
              ifiers below).
       !#     The entire command line typed so far.

论坛徽章:
0
7 [报告]
发表于 2008-08-13 11:47 |只看该作者
多谢楼上的兄弟。
man bash,没试过,我好好看看先。

论坛徽章:
5
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:50:282015年亚洲杯之朝鲜
日期:2015-03-13 22:47:33IT运维版块每日发帖之星
日期:2016-01-09 06:20:00IT运维版块每周发帖之星
日期:2016-03-07 16:27:44
8 [报告]
发表于 2008-08-13 11:48 |只看该作者

回复 #1 hwxo 的帖子

history expansion吧。

论坛徽章:
0
9 [报告]
发表于 2008-08-15 03:47 |只看该作者
":"什么意思
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP