Last active
December 14, 2015 15:48
-
-
Save Aeon/5110246 to your computer and use it in GitHub Desktop.
moving files - there and back again
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if you have a list of files that you had to temporarily move | |
out of a nested subdirectory set into a single directory, you | |
can move them back correctly by doing this on the list of | |
original locations | |
search and replace | |
^(.*?)?([^/\n]*/?)$ | |
with | |
mv "$2" "/origin/$0" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment