1. 程式人生 > 其它 >linux shell 指令碼中 字串擷取並賦值引用

linux shell 指令碼中 字串擷取並賦值引用

技術標籤:linux字串

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

將 arr陣列下標為0的數刪除掉最後一個“/”之後的所有值
刪除掉字串中的url路徑 注意轉義符