当前位置:网站首页>[日常办公][shell]常用代码段
[日常办公][shell]常用代码段
2022-08-04 05:31:00 【xcy6666】
数组, 字符串匹配
arr=("1995" "1995x" "1995ee" "1995ss" "199")
for i in ${arr[*]}; do
if [[ "${i}" =~ "1995".* ]]; then
echo "matched $i"
if [[ $i = "1995ee" ]]; then
echo -e "\tgot $i"
fi
else
echo -e "\t\t\tnot matched $i"
fi
done
查找并kill进程
$ ps -aux | grep name_of_process | grep -v grep | awk '{print $2}' | while read pid; do sudo kill -9 $pid; done
边栏推荐
- LeetCode_Nov_4th_Week
- 打金?工作室?账号被封?游戏灰黑产离我们有多近
- Deep learning, "grain and grass" first--On the way to obtain data sets
- MFC 打开与保存点云PCD文件
- Unity ML-agents 参数设置解明
- IEEE802.X协议族
- No matching function for call to ‘RCTBridgeModuleNameForClass‘
- Endnote编辑参考文献
- 深度确定性策略梯度(DDPG)
- No matching function for call to 'RCTBridgeModuleNameForClass'
猜你喜欢
剪映专业版字幕导出随笔
深度学习理论 —— 初始化、参数调节
【论文阅读】Mining Cross-Image Semantics for Weakly Supervised Semantic Segmentation
lstm pipeline 过程理解(输入输出)
语音驱动嘴型与面部动画生成的现状和趋势
arm交叉编译
Image-Adaptive YOLO for Object Detection in Adverse Weather Conditions
Transformer
【论文阅读】TransReID: Transformer-based Object Re-Identification
【论文阅读】Further Non-local and Channel Attention Networks for Vehicle Re-identification
随机推荐
2020-10-19
Windows10重置MySQL用户密码
[Deep Learning Diary] Day 1: Hello world, Hello CNN MNIST
LeetCode_Nov_3rd_Week
Android foundation [Super detailed android storage method analysis (SharedPreferences, SQLite database storage)]
Copy攻城狮5分钟在线体验 MindIR 格式模型生成
Deep Learning Theory - Overfitting, Underfitting, Regularization, Optimizers
投稿相关
MNIST Handwritten Digit Recognition - Building a Perceptron from Zero for Two-Classification
光条中心提取方法总结(二)
PCL窗口操作
lstm pipeline 过程理解(输入输出)
Tencent and NetEase have taken action one after another. What is the metaverse that is so popular that it is out of the circle?
A code example of the PCL method in the domain of DG (Domain Generalization)
基于asp.net的法律援助平台的设计与实现(附项目链接)
在AWS-EC2中安装Minikube集群
CAS无锁队列的实现
浅谈外挂常识和如何防御
关于DG(域泛化)领域的PCL方法的代码实例
AWS使用EC2降低DeepRacer的训练成本:DeepRacer-for-cloud的实践操作