当前位置:网站首页>[日常办公][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
边栏推荐
猜你喜欢
Copy攻城狮信手”粘“来 AI 对对联
Copy攻城狮的年度之“战”|回顾2020
Brief description of database and common operation guide
基于BiGRU和GAN的数据生成方法
SQL注入详解
MFC读取点云,只能正常显示第一个,显示后面时报错
lstm pipeline 过程理解(输入输出)
【论文阅读】Exploring Spatial Significance via Hybrid Pyramidal Graph Network for Vehicle Re-identificatio
【论文阅读】Anchor-Free Person Search
Deep learning, "grain and grass" first--On the way to obtain data sets
随机推荐
tensorRT教程——tensor RT OP理解(实现自定义层,搭建网络)
MNIST handwritten digit recognition - based on Mindspore to quickly build a perceptron to achieve ten categories
动手学深度学习__数据操作
Data reading in yolov3 (1)
2020-10-29
LeetCode_22_Apr_4th_Week
基于BiGRU和GAN的数据生成方法
【代码学习】
如何成长为高级工程师?
LeetCode_22_Apr_2nd_Week
Deep Learning Theory - Overfitting, Underfitting, Regularization, Optimizers
AWS uses EC2 to reduce the training cost of DeepRacer: DeepRacer-for-cloud practical operation
【论文阅读】SPANET: SPATIAL PYRAMID ATTENTION NETWORK FOR ENHANCED IMAGE RECOGNITION
Install Minikube Cluster in AWS-EC2
No matching function for call to 'RCTBridgeModuleNameForClass'
arm学习-1-开发板
投稿相关
代码庆端午--粽你心意
PCL窗口操作
arm交叉编译