Last active
August 29, 2015 14:06
-
-
Save kojiromike/dc9c914194a4c234446e to your computer and use it in GitHub Desktop.
Dealing with unwieldy filenames in the shell
This file contains 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
$ printf -v filename '"%s" - "%s".epub' "Alice's Adventures in Wonderland" 'Carrol, Lewis' | |
$ printf '[%s]\n' "$filename" | |
["Alice's Adventures in Wonderland" - "Carrol, Lewis".epub] | |
$ >> "$filename" | |
$ ls | |
"Alice's Adventures in Wonderland" - "Carrol, Lewis".epub | |
$ for f in *; do printf '[%s]\n' "$f"; done | |
["Alice's Adventures in Wonderland" - "Carrol, Lewis".epub] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment