当前位置:网站首页>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:
边栏推荐
- Install database -linux-5.7
- DSP data calculation error
- Flink学习笔记(十)Flink容错机制
- 1922. Count Good Numbers
- Hudi data management and storage overview
- Send mail using WP mail SMTP plug-in
- [solution to the new version of Flink without bat startup file]
- PolyWorks script development learning notes (4) - data import and alignment using file import
- Spark 集群安装与部署
- PolyWorks script development learning notes (I) - script development environment
猜你喜欢

【Kotlin学习】高阶函数的控制流——lambda的返回语句和匿名函数

Vscode Arduino installation Library

Run flash demo on ECS
![[CSDN]C1训练题解析_第三部分_JS基础](/img/b2/68d53ad09688f7fc922ac65e104f15.png)
[CSDN]C1训练题解析_第三部分_JS基础

CATIA automation object architecture - detailed explanation of application objects (III) systemservice

PolyWorks script development learning notes (II) -treeview basic operations

Spark cluster installation and deployment

PolyWorks script development learning notes (4) - data import and alignment using file import

Crawler career from scratch (IV): climb the bullet curtain of station B through API

PolyWorks script development learning notes (III) -treeview advanced operation
随机推荐
Flask+supervisor installation realizes background process resident
Common software open source protocols
Equality judgment of long type
PolyWorks script development learning notes (III) -treeview advanced operation
LeetCode每日一题(1856. Maximum Subarray Min-Product)
全球KYC服务商ADVANCE.AI 活体检测产品通过ISO国际安全认证 产品能力再上一新台阶
CATIA automation object architecture - detailed explanation of application objects (III) systemservice
Leetcode daily question (2212. maximum points in an archery competition)
Crawler career from scratch (I): crawl the photos of my little sister ① (the website has been disabled)
Usage of pandas to obtain MySQL data
Crawler career from scratch (3): crawl the photos of my little sister ③ (the website has been disabled)
Directory and switching operation in file system
Leetcode daily question (968. binary tree cameras)
Implementing distributed lock with redis
LeetCode每日一题(2109. Adding Spaces to a String)
[set theory] order relation (eight special elements in partial order relation | ① maximum element | ② minimum element | ③ maximum element | ④ minimum element | ⑤ upper bound | ⑥ lower bound | ⑦ minimu
Solve editor MD uploads pictures and cannot get the picture address
Derivation of Fourier transform
Leetcode daily question (2305. fair distribution of cookies)
Find all possible recipes from given supplies