rename files using a regex with bash

1 for old in *.png;do
2 
3   new=$(echo $old | sed s/abc/xyz/)
4 
5   mv $old $new
6 
7 done

 

posted @ 2023-06-27 14:21  xuyv  阅读(7)  评论(0编辑  收藏  举报