当前位置:网站首页>[日常办公][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
边栏推荐
- 学习资料re-id
- MNIST Handwritten Digit Recognition - Building a Perceptron from Zero for Two-Classification
- 基于BiGRU和GAN的数据生成方法
- 光条中心提取方法总结(二)
- Comparison of oracle's number and postgresql's numeric
- Brief description of database and common operation guide
- 动手学深度学习__数据操作
- 审稿意见回复
- lstm pipeline 过程理解(输入输出)
- No matching function for call to 'RCTBridgeModuleNameForClass'
猜你喜欢

Install Minikube Cluster in AWS-EC2

YOLOV5 V6.1 详细训练方法

【五一专属】阿里云ECS大测评#五一专属|向所有热爱分享的“技术劳动者”致敬#

Use of double pointers

【深度学习日记】第一天:Hello world,Hello CNN MNIST

No matching function for call to 'RCTBridgeModuleNameForClass'

LeetCode_Dec_2nd_Week

基于BiGRU和GAN的数据生成方法

Halcon缺陷检测

Deep learning, "grain and grass" first--On the way to obtain data sets
随机推荐
Tencent and NetEase have taken action one after another. What is the metaverse that is so popular that it is out of the circle?
Unity ML-agents 参数设置解明
tensorRT5.15 使用中的注意点
MNIST手写数字识别 —— ResNet-经典卷积神经网络
亚马逊云科技 Build On 2022 - AIot 第二季物联网专场实验心得
如何用Pygame制作简单的贪吃蛇游戏
bind()系统调用的用处
arm-3-中断体系结构
2020-10-19
深度确定性策略梯度(DDPG)
Introduction to Convolutional Neural Networks
周志华机器学习
图像resize
【代码学习】
【论文阅读】Exploring Spatial Significance via Hybrid Pyramidal Graph Network for Vehicle Re-identificatio
CSDN spree -- college round table spree
Data reading in yolov3 (1)
光条中心提取方法总结(二)
MOOSE平台使用入门攻略——如何运行官方教程的例子
MNIST手写数字识别 —— 从零构建感知机实现二分类