1 Star 0 Fork 0

Nidhogg14/Linux_Command_Line_and_Shell_Scripting_Bible

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
badtest2.sh 260 Bytes
一键复制 编辑 原始数据 按行查看 历史
Nidhogg14 提交于 2023-11-13 21:52 +08:00 . Initial commit
#!/bin/bash
# demonstrating a bad use of variables
function func1 {
temp=$[ $value + 5 ]
result=$[ $temp * 2 ]
}
temp=4
value=6
func1
echo "The result is $result"
if [ $temp -gt $value ]
then
echo "temp is larger"
else
echo "temp is smaller"
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/Nidhogg14/Linux_Command_Line_and_Shell_Scripting_Bible.git
git@gitee.com:Nidhogg14/Linux_Command_Line_and_Shell_Scripting_Bible.git
Nidhogg14
Linux_Command_Line_and_Shell_Scripting_Bible
Linux_Command_Line_and_Shell_Scripting_Bible
master

搜索帮助