如何递归地从文件扩展名末尾删除空格 [英] How to remove spaces from end of file extension recursively
本文介绍了如何递归地从文件扩展名末尾删除空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从* .bmp重命名文件扩展名?到* .bmp。
对不起,我试了很多但是成了linux的新手。我需要一些帮助。
I want to rename file extension from *.bmp? to *.bmp .
Sorry i tried a lot but being a newbie to linux. i need some help.
19024380_fp_2.bmp? 19024532_fp_4.bmp? 19024673_fp_7.bmp? 19024813_fp_6.bmp? 19024380_fp_6.bmp? 19024532_fp_7.bmp? 19024674_17012014.jpg 19024813_fp_9.bmp? 19037410_fp_3.bmp? 19068206_fp_8.bmp? 19093436_fp_9.bmp?
提前致谢。
Thanks in advance.
推荐答案
假设你在文件末尾有?(问号):
assuming that you have ?(question mark) at the end of file:
ls -1 * 。* ? | sed's /.
ls -1 *.*"?" | sed 's/.
//'|读取
做
mv
//' | while read a do mv
这篇关于如何递归地从文件扩展名末尾删除空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文