(转载)http://www.jb51.cc/article/p-tvwbwewa-qw.html
[baby@localhost~]$forfilein`ls*.jpg`;domv$file`echo$file|sed's/_finished//g'`;done;
[baby@localhost~]$ls*.jpg|awk-F"_finished"'{print"mv"$0""$1$2""}'|bash
[baby@localhost~]$ls*.jpg|awk-F"_finished"'{print"mv"$0""$1$2""}' mvstu_102999_1_finished.jpgstu_102999_1.jpg mvstu_102999_2_finished.jpgstu_102999_2.jpg mvstu_102999_3_finished.jpgstu_102999_3.jpg mvstu_102999_4_finished.jpgstu_102999_4.jpg mvstu_102999_5_finished.jpgstu_102999_5.jpg
[baby@localhost~]$rename"_finished"""*.jpg
[baby@localhost~]$forfilein`ls*.jpg`;domv$file`echo${file%_finished*}.jpg`;done;
[baby@localhost~]$forfilein`ls*.jpg`;domv$file${file%_finished*}.jpg;done;
//-----------------------------------------------------------------------------------
将以_singed结尾的apk,去掉这个_signed。
for file in `ls *.apk`;do mv $file `echo $file|sed 's/_signed//g'`;done;原文链接:https://www.f2er.com/bash/391651.html