批量修改文件名的bash脚本

#!/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"

 

posted @ 2019-02-15 17:11  衡子  阅读(530)  评论(0编辑  收藏  举报