#!/bin/sh mediaformasi() { id="mediaformasi" host="https://mediaformasi.com" validateFeed "$id" "$host" cat $tmp \ | shup "article" "a" \ | grep -o "/" \ | while read line ; do url=$(echo $line | grep -o "http.*\">" | cut -d '"' -f 1) # Check if post/entry/article already exist [ ! -z "$(grep "$url" "$dir/feeds/$id.xml")" ] && echo "Entry already exists." # Proceed if doesn't exist [ -z "$(grep "$url" "$dir/feeds/$id.xml")" ] && curl -s $url > $tmp \ && title=$(cat $tmp | shup "title" | sed "s/