Skip to content

Instantly share code, notes, and snippets.

@wbcyclist
Last active August 29, 2015 14:16
Show Gist options
  • Save wbcyclist/c5819d96e5ad88f88e5c to your computer and use it in GitHub Desktop.
Save wbcyclist/c5819d96e5ad88f88e5c to your computer and use it in GitHub Desktop.
shell 批量重命名
# 将Game.Of.Thrones.S01.E01.BluRay.720p.mkv批量增加播放日期在BluRay前
# 如:mv Game.Of.Thrones.S01.E01.BluRay.720p.mkv Game.Of.Thrones.S01.E01.2011.BluRay.720p.mkv
# 批量命令行打印
ls Game.Of.Thrones.S01* | awk -F "BluRay" '{print "mv\t" $0 "\t" $1"2011.BluRay"$2}'
#执行:
ls Game.Of.Thrones.S01* | awk -F "BluRay" '{print "mv\t" $0 "\t" $1"2011.BluRay"$2}'|sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment