当前位置:网站首页>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
边栏推荐
- Notes and bugs generated during the use of h:i:s and y-m-d
- Using DLV to analyze the high CPU consumption of golang process
- Location of package cache downloaded by unity packagemanager
- Get the link behind? Parameter value after question mark
- [rust notes] 08 enumeration and mode
- 【Rust 笔记】07-结构体
- php public private protected
- [rust notes] 11 practical features
- UE4 source code reading_ Bone model and animation system_ Animation compression
- 22-06-27 西安 redis(01) 安装redis、redis5种常见数据类型的命令
猜你喜欢

Allocation exception Servlet

22-06-28 Xi'an redis (02) persistence mechanism, entry, transaction control, master-slave replication mechanism

Deeply understand the underlying data structure of MySQL index

状态压缩DP AcWing 291. 蒙德里安的梦想
![[concurrent programming] thread foundation and sharing between threads](/img/26/60fbfe65b186867a3b1cb58d481226.jpg)
[concurrent programming] thread foundation and sharing between threads

Find the combination number acwing 885 Find the combination number I

Query XML documents with XPath

Binary tree sorting (C language, char type)

Message queue for interprocess communication

Really explain the five data structures of redis
随机推荐
Find the combination number acwing 886 Find the combination number II
DOM render mount patch responsive system
Alibaba canal actual combat
Find the combination number acwing 885 Find the combination number I
状态压缩DP AcWing 291. 蒙德里安的梦想
SQL statement error of common bug caused by Excel cell content that is not paid attention to for a long time
ES6 promise learning notes
Eating fruit
[redis] redis persistent RDB vs AOF (source code)
Unity Editor Extension - event handling
单调栈-84. 柱状图中最大的矩形
Really explain the five data structures of redis
Mortgage Calculator
Unity editor expansion - the framework and context of unity imgui
【Rust 笔记】10-操作符重载
Binary tree sorting (C language, int type)
Notes and bugs generated during the use of h:i:s and y-m-d
[concurrent programming] thread foundation and sharing between threads
Monotonic stack -84 The largest rectangle in the histogram
Dom4j traverses and updates XML