tildelog/lib/get_post_title.sh

10 lines
236 B
Bash

#!/usr/bin/env bash
# Return the post title
#
# $1 the html file
get_post_title() {
#awk '/<h3><a class="ablack" href=".+">/, /<\/a><\/h3>/{if (!/<h3><a class="ablack" href=".+">/ && !/<\/a><\/h3>/) print}' "$1"
head -1 "$1"
}