当前位置:网站首页>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
边栏推荐
- UE4 source code reading_ Bone model and animation system_ Animation compression
- C language student management system based on linked list, super detailed
- [rust notes] 02 ownership
- TP5 order multi condition sort
- Message pack in C deserializes array objects
- Unity Editor Extension - drag and drop
- 20220630 learning clock in
- How to use Jupiter notebook
- [concurrent programming] explicit lock and AQS
- [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
猜你喜欢
Unity editor expansion - draw lines
求组合数 AcWing 886. 求组合数 II
Unity Editor Extension - drag and drop
数位统计DP AcWing 338. 计数问题
UE4 source code reading_ Bone model and animation system_ Animation process
22-06-27 Xian redis (01) commands for installing five common data types: redis and redis
第一个Servlet
ES6 promise learning notes
Annotations simplify configuration and loading at startup
Redux - learning notes
随机推荐
Binary tree sorting (C language, char type)
C language student management system based on linked list, super detailed
数据库原理期末复习
JS non Boolean operation - learning notes
Campus lost and found platform based on SSM, source code, database script, project import and operation video tutorial, Thesis Writing Tutorial
[concurrent programming] concurrent tool class of thread
【Rust 笔记】11-实用特型
On the difference and connection between find and select in TP5 framework
SQL statement error of common bug caused by Excel cell content that is not paid attention to for a long time
XPath实现XML文档的查询
[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
Concurrent programming (V) detailed explanation of atomic and unsafe magic classes
22-06-28 Xi'an redis (02) persistence mechanism, entry, transaction control, master-slave replication mechanism
Format - C language project sub file
Binary tree traversal (first order traversal. Output results according to first order, middle order, and last order)
22-05-26 西安 面试题(01)准备
Downward compatibility and upward compatibility
Unity editor expansion - window, sub window, menu, right-click menu (context menu)
How does unity fixedupdate call at a fixed frame rate
UE4 source code reading_ Bone model and animation system_ Animation process