Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit8a33fd87814b0213c80a674fc8e2dd2eac099bac (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-10-16 18:20:50 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-10-16 18:20:50 +0300
Files510dc9c7dcfa284edf464b83409282df5ac40494
csg-8a33fd87814b0213c80a674fc8e2dd2eac099bac.tar
csg-8a33fd87814b0213c80a674fc8e2dd2eac099bac.tar.gz
csg-8a33fd87814b0213c80a674fc8e2dd2eac099bac.zip
Parent456f1e37b0f3d8fffa23f728004623cb681677df (diff)
(s2) title is found via awk, instead of grep to reduce dependencies
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