我是 shell 脚本的新手,在下面的 shell 脚本中
#!/usr/bin/env sh
PREFIX=${PREFIX-/usr/local}
VERSIONS_DIR=$PREFIX/n/versions
test -d $VERSIONS_DIR || mkdir -p $VERSIONS_DIR
if test $# -eq 0; then
$# -eq 0
在此 shell 脚本中是什么意思?
最佳答案
$# = number of arguments. Answer is 3
$@ = what parameters were passed. Answer is 1 2 3
$? = was last command successful. Answer is 0 which means 'yes'
关于shell - shell 中的 $# -eq 是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17010890/