#!/bin/sh user=$(whoami) cd ~ echo -n "Specify the blog location(~/public_html/blog/): " read location if [ -z $location ] then location="/home/$user/public_html/blog/rss.xml" else location="$location/rss.xml" fi { echo "" echo "" echo "" echo "~$user on TTBP" echo "http://tilde.town/~$user/blog/" echo "$(date)" echo "$user's blog on tilde.town" } > $location for x in $(ls /home/$user/.ttbp/entries) do { echo "" echo "$(echo $x | sed -E s/\.txt//g)" echo "$(echo $x | awk '{printf substr($0,1,4) "-" substr($0,5,2) "-" substr($0,7,2)}')" echo "http://tilde.town/~$user/blog/$(echo $x | sed -E s/\.txt/\.html/)" echo "" echo "$user@tilde.town" echo "" } >> $location done { echo "" echo "" } >> $location echo "Finished generating rss feed... you can now go to $(echo $location | sed -E "s/^.*public_html/http:\/\/tilde\.town\/~$user/")"