#!/bin/bash
echo "演示"
#打印所有参数
echo "所有参数是:" $*
#打印参数个数
echo "参数个数是:" $#j=0;
for i in "$@"do
#这句j后面不能加空格,不知道为啥,以后再看
j=`expr $j + 1`;
echo "第" $j "个参数是 :" $i
done 原文链接:https://www.f2er.com/bash/391780.html#!/bin/bash
echo "演示"
#打印所有参数
echo "所有参数是:" $*
#打印参数个数
echo "参数个数是:" $#j=0;
for i in "$@"do
#这句j后面不能加空格,不知道为啥,以后再看
j=`expr $j + 1`;
echo "第" $j "个参数是 :" $i
done 原文链接:https://www.f2er.com/bash/391780.html