Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 1 insertions, 2 deletions
-rwxr-xr-xcsg3
diff --git a/csg b/csg
index f3107d6..f781966 100755
--- a/csg
+++ b/csg
@@ -70,8 +70,7 @@ transform-file() {
local scripts="$2"
# Markdown stats for a file: title, description, words, date created, date edited
- local title="$(grep -m 1 '^# ' "$file")"
- local title="${title:2}"
+ local title="$(awk '/^# / {print substr($0, 2); exit}' "$file")"
local descr="$(awk '
/^[[:alpha:]]/ {
startedGathering = 1