基于shell的相似文件名的批量操作
Tofloor
poster avatar
ganrui
deepin
2018-05-16 06:46
Author
虽然功能比较简单,以前不会的时候也挺头疼


  1. #!/bin/sh

  2. filelist=`ls *-gnueabihf-*`

  3. for filename in $filelist
  4. do
  5.       echo $filename
  6.       refilename=`echo $filename|sed "s/-gnueabihf-/-/g"`
  7.       echo $refilename
  8.       ln $filename $refilename
  9. done
Copy the Code

Reply Favorite View the author
All Replies
avatar
WENWEN
deepin
2018-05-16 06:48
#1
深度文管不是支持吗?
Reply View the author
avatar
ganrui
deepin
2018-05-16 06:52
#2
https://bbs.deepin.org/post/156501
深度文管不是支持吗?

还没研究过
Reply View the author
avatar
ganrui
deepin
2018-05-16 07:02
#3
https://bbs.deepin.org/post/156501
深度文管不是支持吗?

试了下,的确可以
Reply View the author