当前位置:网站首页>Shell logic case
Shell logic case
2022-07-03 09:36:00 【chenhyc】
Case study 1:ping Pass back www.baidu.com is up,ping No return www.baidu.com is down
Code :ping -c1 www.baidu.com && echo “www.baidu.com is up” || “www.baidu.com is down”
remarks , If not shown ping The process , You can change to :ping -c1 www.baidu.com &> /dev/null
Case study 2:
边栏推荐
- Directory and switching operation in file system
- Idea uses the MVN command to package and report an error, which is not available
- Crawler career from scratch (I): crawl the photos of my little sister ① (the website has been disabled)
- [kotlin learning] control flow of higher-order functions -- lambda return statements and anonymous functions
- 【Kotlin学习】高阶函数的控制流——lambda的返回语句和匿名函数
- Flink学习笔记(十)Flink容错机制
- Common formulas of probability theory
- Flink学习笔记(八)多流转换
- Call the contents of Excel cells opened at the same time - button line feed
- PolyWorks script development learning notes (4) - data import and alignment using file import
猜你喜欢
Leetcode daily question (1162. as far from land as possible)
全球KYC服务商ADVANCE.AI 活体检测产品通过ISO国际安全认证 产品能力再上一新台阶
PolyWorks script development learning notes (II) -treeview basic operations
Solve editor MD uploads pictures and cannot get the picture address
CATIA automation object architecture - detailed explanation of application objects (III) systemservice
About the configuration of vs2008+rade CATIA v5r22
LeetCode每日一题(931. Minimum Falling Path Sum)
Trial of the combination of RDS and crawler
Hudi integrated spark data analysis example (including code flow and test results)
Flink learning notes (XI) table API and SQL
随机推荐
The number of weak characters in the game (1996)
Flink学习笔记(十一)Table API 和 SQL
用Redis实现分布式锁
Arduino handles JSON data, arduinojson assistant
Desktop icon recognition based on OpenCV
Serializer rewrite: update and create methods
Hudi 快速体验使用(含操作详细步骤及截图)
DSP data calculation error
Spark structured stream writing Hudi practice
Logstash+jdbc data synchronization +head display problems
Hudi 集成 Spark 数据分析示例(含代码流程与测试结果)
Solve the problem of disordered code in vscode development, output Chinese and open source code
Run flash demo on ECS
Flink learning notes (10) Flink fault tolerance mechanism
Common formulas of probability theory
PolyWorks script development learning notes (II) -treeview basic operations
Crawler career from scratch (IV): climb the bullet curtain of station B through API
Leetcode daily question (985. sum of even numbers after queries)
【Kotlin学习】高阶函数的控制流——lambda的返回语句和匿名函数
LeetCode每日一题(2090. K Radius Subarray Averages)