Shell 编程简介
第一个Shell脚本
#!/bin/bash
for ((i=0; i<10; i++)); do
echo "Hello Shell"_$i
done运行 Shell 脚本有两种方法:
chmod +x ./test.sh #使脚本具有执行权限
./test.sh #执行脚本Last updated
#!/bin/bash
for ((i=0; i<10; i++)); do
echo "Hello Shell"_$i
donechmod +x ./test.sh #使脚本具有执行权限
./test.sh #执行脚本Last updated
/bin/sh test.sh