![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Shell脚本
文章平均质量分 90
欧冶渃
这个作者很懒,什么都没留下…
展开
-
Shell流程判断
1.if 判断 1.基本语法 if[ 条件判断式 ] then 程序 fi if [ 条件判断式 ] then 程序 elif [ 条件判断式 ] then 程序 else 程序 fi 注意事项: (1)[ 条件判断式 ],中括号和条件判断式之间必须有空格 (2)if后要有空格 1.2案例 创建一个sh脚本 ...原创 2022-01-29 14:13:31 · 423 阅读 · 0 评论 -
Shell脚本
3.shell脚本入门 3.1脚本格式 脚本以#!/bin/bash开头(指定解析器) 3.2.第一个Shell脚本:helloworld (1)需求:创建一个Shell脚本,输出helloworld (2)案例实操: 1.创建一个Shell文本 vim HelloShell 2.使用bash解析器编写 3.使用命令执行shell脚本 4.使用./执行Shell脚本 4.1先给root用户添加执行权限 chmod u+x HelloShell.sh 4.2在执行...原创 2022-01-28 11:22:23 · 1216 阅读 · 0 评论