$ rename -n 's/result_([0-9]+)_([0-9]+)_([0-9]+)\.json\.txt/sprintf("%d%02d%02d.txt",$3,$2,$1)/ge' result_*.txtGiven a bunch of files with "wrong" date naming, it renames them in a "good" format.
by David Winterbottom (codeinthehole.com)
from All commands http://ift.tt/1xSqqVc
No comments:
Post a Comment