[bash's [ command & [[ keyword]

[ (test) command:

  bash中的条件测试語句, [ condition ], 并不是一个語句, 而是一个命令, 命令的名字是 [ , 这个命令期待最后一个参数是 ] .

  在terminal中键入 whereis [, 可以看到[ 命令被放在系统中的哪个地方.

  

[[ keyword:

  [[是[的扩展, 是bash中的keyword,提供比[更强大的功能, 更方便的使用方法.

  

  Special primitives that [[ is defined to have, but [ may be lacking (depending on the implementation):

  

  As a rule of thumb, [[ is used for strings and files. If you want to compare numbers, use an ArithmeticExpression

参考:

  1. http://bash.cumulonim.biz/FullBashGuide.html

  2. http://bash.cumulonim.biz/BashFAQ(2f)031.html

最新文章

  1. WebGIS项目中利用mysql控制点库进行千万条数据坐标转换时的分表分区优化方案
  2. [转]ExtJS Grid 分页时保持选中的简单实现方法
  3. python多线程实现同时执行两个while循环
  4. Windows Azure IP地址详解
  5. plain framework 1 pak插件说明(资源压缩加密)
  6. Region的预分区
  7. 整合maven,jetty,jrebel进行debug调试
  8. 事件:target与currentTarget区别
  9. less 工具
  10. IE浏览器因缓存问题未能成功向后端发送请求的几个解决办法
  11. AJAX随笔1
  12. NiftyNet项目介绍
  13. hive条件函数
  14. Prolog 逻辑推导语言
  15. 【安装防火墙】没有iptables时的解决办法
  16. MFC中不同对话框间使用SendMessage发送自定义消息的具体实现
  17. delphi 6数据库连接之长短模式(sqlserver)
  18. u-boot编译
  19. 详解LeetCode 137. Single Number II
  20. 20145324 Java实验二

热门文章

  1. HTML CSS 表格换行禁止 超出指定长度自动截断
  2. python: find the index of a given value in a list
  3. filter防盗链
  4. 进程间通信IPC之--无名管道(pipe)和有名管道(fifo)(转)
  5. angular的指令独立作用域(以及$watch的使用)
  6. java多线程(2) 线程同步
  7. python(ValueError: invalid literal for int() with base 10: 'abc' ‘1.0‘’’)强制类型转换
  8. POJ 2566 Bound Found(尺取法,前缀和)
  9. activemq的启动方式
  10. 第十章 Secret & Configmap (上)