![]() ![]() Or maybe you want to do some other renaming operation throughout a tree - this command's useful for that, too. Sometimes, you don't want to just replace the spaces in the current folder, but through the whole folder tree - such as your whole music collection, perhaps. ![]() I think it's that conversation between programmer and computer, as the pipeline is built piece-by-piece, that is the more valuable lesson than any canned script. On a tangent: One of the things I wish commandlinefu would show is the command line HISTORY of the person as they developed the script. ![]() That's why Unix is such a huge boost to productivity: it allows each person to think their own way instead of enforcing some "right way". One-off tasks can be be written quickly, built-up as a person is "thinking aloud" at the command line. I think flexibility in expressiveness like this is part of the beauty of Unix shell scripting. For example, I find 'rev | cut -f1 | rev' pleasantly amusing - it seems so clearly wrong, and yet it works to print the last argument. I only needed to do this once and spent hardly any time on it, so it's a bit goofy. It grew piece by piece on the command line. REQUIREMENTS: Bash (for extended pattern globbing), showttf (Debian has it in the fontforge-extras package), GNU grep (for context), and rev (because it's hilarious).īUGS: Well, like I said, this is a quick hack. otf files, but make sure you change the mv part so it gives them the proper extension. ttf files based on the name embedded inside the font. I wanted to copy some, but not all, of them over to my new machine, but I had no idea what many of them were. I'd accumulated a big bunch of bizarrely and inconsistently named font files in my ~/.fonts directory. Just a quick hack to give reasonable filenames to TrueType and OpenType fonts. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |