是什么$ *在shell脚本的意思 [英] what does $* mean in a shell script
本文介绍了是什么$ *在shell脚本的意思的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是什么 $ *
在shell脚本究竟意味着什么呢?
例如考虑以下code段
$ JAVA_HOME /斌/ JAVA / COM /测试/ $的TestClass *
解决方案
这意味着传递给脚本或函数的所有参数,以字分割。
这通常是错的,应该由$ @
,它适当地分离的参数进行更换。
What does $*
exactly mean in a shell script?
For example consider the following code snippet
$JAVA_HOME/bin/java/com/test/Testclass $*
解决方案
It means all the arguments passed to the script or function, split by word.
It is usually wrong and should be replaced by "$@"
, which separates the arguments properly.
这篇关于是什么$ *在shell脚本的意思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文