当前位置:网站首页>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
边栏推荐
- PHP mnemonic code full text 400 words to extract the first letter of each Chinese character
- Concurrent programming (VI) ABA problems and solutions under CAS
- UE4 source code reading_ Mobile synchronization
- Format - C language project sub file
- 第一个Servlet
- Downward compatibility and upward compatibility
- 【Rust 笔记】09-特型与泛型
- Debug debugging - Visual Studio 2022
- Apache startup failed phpstudy Apache startup failed
- Monotonic stack -84 The largest rectangle in the histogram
猜你喜欢

树形DP AcWing 285. 没有上司的舞会

Dom4j traverses and updates XML

Binary tree traversal (first order traversal. Output results according to first order, middle order, and last order)

数据库原理期末复习

Monotonic stack -84 The largest rectangle in the histogram

【Rust笔记】02-所有权

樹形DP AcWing 285. 沒有上司的舞會

Phpstudy 80 port occupied W10 system
![[concurrent programming] Table hopping and blocking queue](/img/b7/023991a00956e469af855e7a81e126.jpg)
[concurrent programming] Table hopping and blocking queue

UE4 source code reading_ Bone model and animation system_ Animation compression
随机推荐
Concurrent programming (VI) ABA problems and solutions under CAS
[set theory] order relation (total order relation | total order set | total order relation example | quasi order relation | quasi order relation theorem | bifurcation | quasi linear order relation | q
求组合数 AcWing 886. 求组合数 II
Facial expression recognition based on pytorch convolution -- graduation project
[concurrent programming] Table hopping and blocking queue
Methods of checking ports according to processes and checking processes according to ports
【Rust 笔记】07-结构体
too many open files解决方案
Unity editor expansion - the design idea of imgui
UE4 source code reading_ Bone model and animation system_ Animation node
JS ternary operator - learning notes (with cases)
SQL statement error of common bug caused by Excel cell content that is not paid attention to for a long time
[RPC] RPC remote procedure call
单调栈-503. 下一个更大元素 II
[concurrent programming] consistency hash
Find the combination number acwing 886 Find the combination number II
Binary tree traversal (first order traversal. Output results according to first order, middle order, and last order)
Concurrent programming (III) detailed explanation of synchronized keyword
Servlet的生命周期
php public private protected