摘要: > \`命令\` == $(命令),两种语句格式效果相同,都执行其中的命令,只返回执行结果。 ## while 循环语句 ```bash #!/bin/bash # haha.sh PRICE=$(expr $RANDOM % 1000) TIMES=0 while true do read -p 阅读全文
posted @ 2023-05-30 16:16 berthua 阅读(5) 评论(0) 推荐(0) 编辑
摘要: ## Shell 脚本 - 脚本声明 ```bash #!/bin/bash ``` - 脚本注释 ```bash # example script ``` - 脚本命令 ```bash uptime free -h reboot ``` - 脚本执行 ```bash $ cat xiaoxian. 阅读全文
posted @ 2023-05-30 10:23 berthua 阅读(6) 评论(0) 推荐(0) 编辑