批量修改檔名的bash指令碼

衡子發表於2019-02-15
#!/bin/bash
while IFS='' read -r line || [[ -n "$line" ]]; do
#    echo "sox $line --channels=1 --rate 16k --bits 16  ./sox/$line"
  if [[ $line == *" (1).wav" ]]; then
    echo  "mv ${line% *}\ \(1\).wav ${line% *}.wav"
  fi
done < "$1"

 

相關文章