Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the test operators for the basics of shell scripts

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you what the basic knowledge of shell script test operators are, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

I. the size of the integer tester; note: spaces must be left on both sides of the operator

[intnum1-eq intnum2] or [[intnum1-eq intnum2]]

-eq: equal to [intnum1-ne intnum2] or [[intnum1-ne intnum2]]-ne: not equal to [intnum1-gt intnum2] or [[intnum1-gt intnum2]]-gt: greater than [intnum1-ge intnum2] or [[intnum1-ge intnum2]]-ge: greater than or equal to [intnum1-lt intnum2] or [intnum1-lt intnum2]-lt: less than [intnum1-le intnum2] or [[intnum1-le intnum2]-le: less than, etc. Spaces on both sides of ((intnum1 = = intnum2)) can omit two numbers equal to returning true ((intnum1! = intnum2)). Two numbers are not equal to returning true ((intnum1 > intnum2)). Two numbers are greater than returning true ((intnum1 > = intnum2)). Two numbers are greater than or equal to returning true ((intnum1 < intnum2)). Two numbers are less than returning true ((intnum1).

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report