shell script get and print all arguments

#!/bin/bash
echo $@
for i in $@; do
    echo $i
done

paraphrase

$@: Pass in all parameters of the script

$#: The number of all parameters passed in the script

$0: Script name

$1: The first parameter

$n: entry n (n stands for number)

Guess you like

Origin blog.csdn.net/Sheleon1995/article/details/126763677