开发者

Too many arguments to Bash script?

I have a Bash script to which I am sending 10 arguments.

I'm trying to access the tenth argument开发者_StackOverflow社区, such as echo $10.

Instead I get the first argument with a zero appended.

Any thoughts on how I can access the tenth argument?


Use ${10} instead of $10. You can use this for a seemingly arbitrary number of arguments. I've tested it up to ${100} successfully.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜