![](https://img-blog.csdnimg.cn/20200902233736673.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
shell
shell脚本编程学习
欲盖弥彰1314
如有一味绝境,非历十方生死。
展开
-
shell脚本编程学习笔记(二)
条件 用于判断的命令: test 或者 [ ] test是shell的内置命令 test命令可以判断的条件类型三种: 字符串比较 字符串比较 描述 string1 = string2 字符串相同返回真 string1 != string2 字符串不同返回假 -n string 字符串不NULL空为真 -z string 字符串为NULL为真 算术比较 类似C语言的关系运算符 算数比较 描述 expression1 -eq expression2原创 2020-07-13 15:16:49 · 150 阅读 · 0 评论 -
shell脚本编程学习笔记(一)
shell脚本编程 shell语法类似C语言,C语言是编译型语言,shell是解释型语言。 脚本格式 #!/bin/bash #shell解释器有很多种,所以要指定shell解释器 echo "hello world" 变量 shell默认变量一般都是字符串 变量定义、赋值 命名规则和C语言类似,不能以数字开头 yourname="guangjieMVP" #左值和“=”...原创 2020-03-22 21:43:36 · 563 阅读 · 0 评论