免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1373 | 回复: 2

linux命令请教 [复制链接]

论坛徽章:
0
发表于 2006-12-19 20:05 |显示全部楼层
sudo apt-get update && apt-get install checkinstall
这组命令在两个命令中间用了两个&, &&表示什么意思?高手请指教,谢谢

论坛徽章:
0
发表于 2006-12-19 20:10 |显示全部楼层
原帖由 barrcuda 于 2006-12-19 20:05 发表
sudo apt-get update && apt-get install checkinstall
这组命令在两个命令中间用了两个&, &&表示什么意思?高手请指教,谢谢


KSH(1)                    User commands                    KSH(1)

       pipelines; |& is used to create co-processes (see  Co-Pro-
       cesses  below);  ; is used to separate commands; & is used
       to create asynchronous pipelines; && and ||  are  used  to
       specify  conditional  execution
; ;; is used in case state-
       ments; (( .. )) are used in  arithmetic  expressions;  and
       lastly, ( .. ) are used to create subshells.

条件执行,具体的可以参考相应 shell 的手册。Linux 上用得比较多的是 bash,你可以参考一下 bash(1)

论坛徽章:
0
发表于 2006-12-19 21:38 |显示全部楼层

回复 1楼 barrcuda 的帖子

&&前命令执行不返回错误,者执行后边的命令,否则不执行
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP