
shell
柱子不吃西红柿
水平有限,请大家多多指正,无限感激。
展开
-
sed 正则表达式替换邮编(替换数字)
样本:INSERT INTO `wkb_yl`.`yl_park_image` (`url`, `type`, `park_code`, `image_desc`, `status`, `sort`, `create_time`) VALUES (110018, 'https://123.abc.com/123/123.jpg', 100, 'wz-ouyuan', '', 1, 1, '2022-04-12 14:44:47');要求: 把url 前面的 110018 去掉代码:sed s#'[原创 2022-04-18 20:07:23 · 870 阅读 · 0 评论 -
debian11安装docker.sh
#!/bin/bash# 卸载旧版本sudo apt-get remove docker docker-engine docker.io containerd runc -y# 安装软件包以允许 apt 通过 HTTPS 使用存储库sudo apt-get update -ysudo apt-get install apt-transport-https ca-certificates curl software-properties-common gnupg2 -y# 添加 Docker原创 2022-02-26 10:27:51 · 553 阅读 · 0 评论 -
debian11安装vscode.sh
请注意,该文章内容来源于 山上一缕烟#!/bin/bash# 在你的Debian linux操作系统上通过以下步骤来完成 VS Code 的安装。# 01、首先输入以下内容来更新软件包索引并安装依赖项:sudo apt updatesudo apt install software-properties-common apt-transport-https curl# 02、使用以下curl命令导入Microsoft GPG密钥:curl -sSL https://packages.mic转载 2022-02-26 10:15:17 · 832 阅读 · 0 评论 -
Centos7 搭建sftp
sftp直接用ssl即可,无需像ftp那样需要单独的软件。直接贴代码#!/bin/bash######################################## sftp_auto_install.sh# 搭建sftp# 执行须带两个参数# such as# sh sftp_auto_install.sh user01 123123# by zhu# 2018...原创 2018-09-05 14:51:29 · 1001 阅读 · 0 评论 -
Check if user is root
# Check if user is root[ $(id -u) != "0" ] && { echo "${CFAILURE}Error: You must be root to run this script${CEND}"; exit 1; }转载 2018-09-05 15:35:48 · 275 阅读 · 0 评论