bash's [ command & [[ keyword
2024-09-28 16:51:25
[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
最新文章
- WebGIS项目中利用mysql控制点库进行千万条数据坐标转换时的分表分区优化方案
- [转]ExtJS Grid 分页时保持选中的简单实现方法
- python多线程实现同时执行两个while循环
- Windows Azure IP地址详解
- plain framework 1 pak插件说明(资源压缩加密)
- Region的预分区
- 整合maven,jetty,jrebel进行debug调试
- 事件:target与currentTarget区别
- less 工具
- IE浏览器因缓存问题未能成功向后端发送请求的几个解决办法
- AJAX随笔1
- NiftyNet项目介绍
- hive条件函数
- Prolog 逻辑推导语言
- 【安装防火墙】没有iptables时的解决办法
- MFC中不同对话框间使用SendMessage发送自定义消息的具体实现
- delphi 6数据库连接之长短模式(sqlserver)
- u-boot编译
- 详解LeetCode 137. Single Number II
- 20145324 Java实验二
热门文章
- HTML CSS 表格换行禁止 超出指定长度自动截断
- python: find the index of a given value in a list
- filter防盗链
- 进程间通信IPC之--无名管道(pipe)和有名管道(fifo)(转)
- angular的指令独立作用域(以及$watch的使用)
- java多线程(2) 线程同步
- python(ValueError: invalid literal for int() with base 10: 'abc' ‘1.0‘’’)强制类型转换
- POJ 2566 Bound Found(尺取法,前缀和)
- activemq的启动方式
- 第十章 Secret &; Configmap (上)