$#, $* and $@ in bash

This is little script shows the usage of $#, $* and $@ in bash.

#!/bin/bash

function countargs {
    echo "$# args."
}

echo "$*"
countargs "$*"
countargs "$@"
 

猜你喜欢

转载自yaojingguo.iteye.com/blog/826170