linux-tutorial/codes/shell/输入和输出/抓取所有数据.sh

18 lines
236 B
Bash

#!/usr/bin/env bash
# testing $* and $@
count=1
for param in "$*"
do
echo "\$* Parameter #$count = $param"
count=$[ $count + 1 ]
done
count=1
for param in "$@"
do
echo "\$@ Paramenter #$count = $param"
count=$[ $count + 1 ]
done