rename

find

mv

#实现查找png 和 jpeg文件

#!/bin/bash

#file name: rename.sh

#use: rename.jpg  and .png files

count=1;

for img in `find . -iname '*.png' -o -iname '*.jpg' -type f -maxdepth 1`

do

    new=image-$count.${img##*.}

 

    echo "Renaming $img to $new"

    mv "$img" "$new"

    let count++

done

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2022-01-29
  • 2022-12-23
  • 2022-02-13
  • 2022-12-23
猜你喜欢
  • 2022-02-17
  • 2021-06-11
  • 2021-12-21
  • 2022-12-23
  • 2021-06-14
  • 2022-12-23
  • 2021-06-23
相关资源
相似解决方案