我遇到了已经存在的shell脚本。试图理解$ {1 ,,}在这里的含义:
if [[ ${2} -eq 0 ]]; then delNam${1,,}_delete_$date
Shell脚本新手。
${1,,}将第一个位置参数转换为小写。换句话说,如果脚本的运行方式类似于和是,则第二行将扩展为,然后将其作为命令运行。./script.sh FooBar 0$date2016delNamfoobar_delete_2016
${1,,}
./script.sh FooBar 0
$date
2016
delNamfoobar_delete_2016
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
点击生成二维码
我来说两句