tildelog/lib/get_post_title.sh

10 lines
236 B
Bash
Raw Normal View History

2020-12-19 19:43:21 +00:00
#!/usr/bin/env bash
# Return the post title
#
# $1 the html file
get_post_title() {
2021-02-10 20:48:40 +00:00
#awk '/<h3><a class="ablack" href=".+">/, /<\/a><\/h3>/{if (!/<h3><a class="ablack" href=".+">/ && !/<\/a><\/h3>/) print}' "$1"
head -1 "$1"
}