Created
August 21, 2025 09:23
-
-
Save singularitti/6a8e15b2b0967f93b9f23b927a98a0d8 to your computer and use it in GitHub Desktop.
Generate sorted font list with quotes #OS #file #font #Shell
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
| # This command finds all `.otf` font files in the current directory and subdirectories, | |
| # sorts them alphabetically by path, and outputs each as: `font "Folder/File.otf"` | |
| # | |
| # Step by step: | |
| # 1. `find . -type f -name "*.otf"` → locate all `.otf` files | |
| # 2. `sort` → order results alphabetically | |
| # 3. `sed 's|^\./|font "|; s|$|"|'` → remove leading "./", add 'font "' prefix, and closing '"' | |
| find . -type f -name "*.otf" \ | |
| | sort \ | |
| | sed 's|^\./|font "|; s|$|"|' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment