linux shell 脚本中 字符串截取并赋值引用

      mkdir -p /data/www/flowbilling/`echo ${arr[0]%/*}|sed 's/\/home\/www\/flowbilling-report\/TuikuanIamges\///g'`

将 arr数组下标为0的数删除掉最后一个“/”之后的所有值
删除掉字符串中的url路径 注意转义符

猜你喜欢

转载自blog.csdn.net/weixin_44578029/article/details/111308473
今日推荐