#!/bin/bash set -e cd /app/src/blog IFS=' ' for file in * do title=$(head -n1 $file) line=$(head -n4 $file | tail -n1) linkname=$(echo $file | awk -F "." '{print $1}') echo '

'"$title"'

'"$line"'...

Read More
' >> /app/src/static/markdown/blog.html echo "generated info for $file" done