tildelog/lib/get_post_author.sh

10 lines
289 B
Bash

#!/usr/bin/env bash
# Return the post author
#
# $1 the html file
declare global_author
get_post_author() {
# awk '/<div class="subtitle">.+/, /<!-- text begin -->/{if (!/<div class="subtitle">.+/ && !/<!-- text begin -->/) print}' "$1" | sed 's/<\/div>//g'
echo $global_author
}