diff options
| Commit | 8a33fd87814b0213c80a674fc8e2dd2eac099bac (patch) | |
|---|---|---|
| Author | 2023-10-16 18:20:50 +0300 | |
| Committer | 2023-10-16 18:20:50 +0300 | |
| Files | 510dc9c7dcfa284edf464b83409282df5ac40494 | |
| csg-8a33fd87814b0213c80a674fc8e2dd2eac099bac.tar csg-8a33fd87814b0213c80a674fc8e2dd2eac099bac.tar.gz csg-8a33fd87814b0213c80a674fc8e2dd2eac099bac.zip | ||
| Parent | 456f1e37b0f3d8fffa23f728004623cb681677df (diff) | |
(s2) title is found via awk, instead of grep to reduce dependencies
1 files changed, 1 insertions, 2 deletions
| -rwxr-xr-x | csg | 3 |
@@ -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 |
