shell命令行参数

shell命令行参数_第1张图片

#!/bin/bash
echo "Number of arguments: $#"

echo "All arguments as a single string: $*"

echo "All arguments as a single string: $0,$1,$2"
for i in "$@"
do
  echo "这是第 $i 次循环"
done

你可能感兴趣的:(java,服务器,linux)