当前位置:网站首页>The difference between if -n and -z in shell
The difference between if -n and -z in shell
2022-07-03 08:53:00 【Xiaoping is extraordinary】
if [ str1 = str2 ] When two strings have the same content 、 Length is true
if [ str1 != str2 ] Dangchuang str1 and str2 It's true when you don't wait
if [ -n str1 ] When the length of the string is greater than 0 Time is true ( The string is not empty )
if [ -z str1 ] When the length of the string is 0 Time is true ( Empty string )
if [ str1 ] Dangchuang str1 If it's not empty, it's true
边栏推荐
- Concurrent programming (V) detailed explanation of atomic and unsafe magic classes
- createjs easeljs
- 数据库原理期末复习
- Talking about: is the HashSet set ordered or disordered /hashset set unique, why can we store elements with the same content
- PHP mnemonic code full text 400 words to extract the first letter of each Chinese character
- [concurrent programming] atomic operation CAS
- Escape from heaven and forget what he suffered. In ancient times, it was called the punishment of escape from heaven. Article collection
- [concurrent programming] thread foundation and sharing between threads
- UE4 source code reading_ Bone model and animation system_ Animation compression
- Monotonic stack -503 Next bigger Element II
猜你喜欢

Markdown learning

Alibaba canal actual combat

单调栈-503. 下一个更大元素 II

Analysis of Alibaba canal principle

二进制转十进制,十进制转二进制

Unity editor expansion - scrolling list

DOM 渲染系统(render mount patch)响应式系统

记忆化搜索 AcWing 901. 滑雪

UE4 source code reading_ Bone model and animation system_ Animation process

Memory search acwing 901 skiing
随机推荐
22-06-28 Xi'an redis (02) persistence mechanism, entry, transaction control, master-slave replication mechanism
Unity editor expansion - window, sub window, menu, right-click menu (context menu)
分配异常的servlet
UE4 source code reading_ Bone model and animation system_ Animation process
createjs easeljs
JS non Boolean operation - learning notes
[concurrent programming] synchronization container, concurrent container, blocking queue, double ended queue and work secret
【Rust 笔记】11-实用特型
Analysis of Alibaba canal principle
Unity Editor Extension - drag and drop
Deeply understand the underlying data structure of MySQL index
UE4 source code reading_ Mobile synchronization
How to use Jupiter notebook
Phpstudy 80 port occupied W10 system
Gaussian elimination acwing 883 Gauss elimination for solving linear equations
URL backup 1
Unity Editor Extension - event handling
UE4 source code reading_ Bone model and animation system_ Animation compression
22-06-27 Xian redis (01) commands for installing five common data types: redis and redis
On the setting of global variable position in C language