Created
May 24, 2021 13:14
-
-
Save puryfury/3abf9f458e3e7fbb1e87bee32d833da6 to your computer and use it in GitHub Desktop.
A one-liner shell that rename original file name from URL encoded file name.
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
| # rename uel encoded file to original from files start with '%' in current directory. | |
| for old in \%*; do new=$(echo $old | sed "s@+@ @g;s@%@\\\\x@g" | xargs -0 printf "%b"); mv -- "$old" "$new"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment