bash 当我尝试 echo $10 它变成 echo $1 0
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6146028/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 00:03:59 来源:igfitidea点击:
when i try to echo $10 it becomes echo $1 0
提问by Doboy
given something like this
给出这样的东西
find -type f -newermt "2011-05-26 15:40:35.088712" | xargs -n 1 bash -c fn=##代码##; set -- `ls -l $fn`; echo ;
I expect it to output the content in $10 when i try to echo $10 what really happens is it echos $1 along with 0, how do i make it echo $(10)
当我尝试回显 10 美元时,我希望它输出 10 美元的内容,真正发生的是它同时回显 1 美元和 0,我如何让它回显 $(10)
回答by Carl Norum
You need to use echo ${10}to make that work.
你需要使用echo ${10}来完成这项工作。

