Created
July 21, 2017 19:03
-
-
Save davidejones/6581717c47e23f5dc94ceb96be74406c to your computer and use it in GitHub Desktop.
count hugo front matter params in a directory
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
#!/usr/bin/env bash | |
# grep | |
# -i case insensitive | |
# -l output file names only | |
# | |
# Any line that begins with zero or more spaces | |
# followed by word "featured" | |
# followed by zero or more spaces | |
# followed by ":" | |
# followed by zero or more space | |
# followed by true | |
# followed by zero or more spaces | |
# followed by end of the line | |
grep -il '^\s*featured\s*:\s*true\s*$' ./content/blog/*.md | wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment