![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Shell
拾一滴清水
编你所思,程你所想。
展开
-
shell脚本显示命令本身及其执行状态
显示命令内容及其执行状态judge(){ $1 > /dev/null if [[ $? -eq 0 ]];then echo -e "执行命令: $1\t执行结果: 成功" else echo -e "执行命令:$1\t执行结果: 失败" fi}echo "第一次执行"judge "pwd"echo "第二次执行"judge "pwd2"第一次执行执行命令: pwd 执行结果: 成功第二次执行执行命令:pwd2 执行结果: 失败...原创 2021-01-15 11:13:19 · 1627 阅读 · 0 评论 -
shell脚本清除同时满足多个过滤条件的docker容器
shell脚本清除相关容器条件1: 清除容器名中包含ngnix的容器条件2: 在条件1的基础上,清除容器中状态为Exited的容器docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Names}}\t{{.Status}}' | awk '/nginx/ && /Exited/' | awk '{print $1}' | xargs docker rm...原创 2021-01-14 20:12:15 · 1104 阅读 · 0 评论 -
windows与mac通过ssh互连实现文件查看
windows 与mac通过ssh互连实现文件查看参考链接1. mac上通过ssh连接windows安装OpenSSH服务端与OpenSSH客户端;【设置 => 应用 => 可选功能 => 添加功能 => 选择OpenSSH服务端与OpenSSH客户端进行安装】在计算机管理 => 服务中,将OpenSSH Authentication Agent 服务和 OpenSSH SSH Server 服务都设置为自启动;通过命令 netstat -an | finds原创 2020-08-29 19:35:14 · 10845 阅读 · 1 评论 -
Ubuntu18.04图形化界面远程访问win10
说明原创 2019-06-26 22:32:15 · 7859 阅读 · 0 评论