Linux shell脚本传参,传入数组
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
1、编写可接受数组参数的脚本:
test.sh :
#!/bin/bash
for i in $@
do
echo $i
done
2、给脚本执行权限:
chmod +x test.sh
3、测试
./test.sh 1 2 3
输出结果:
1
2
3




A beautiful web dashboard for Linux
最近提交(Master分支:9 天前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
更多推荐
所有评论(0)