Skip to content

Commit

Permalink
Moved variable and fixed formatting for 'editpost'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Szymanski committed Dec 20, 2010
1 parent 3c0ea67 commit f3a4d44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/jekyll.plugins.bash
Expand Up @@ -5,14 +5,14 @@ editpost() {

COUNTER=1
NUMBER="$RANDOM"
TMPFILE="/tmp/editpost-$NUMBER"

for POST in *
do
DATE=`echo $POST | grep -oE "[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}"`
TITLE=`cat $POST | grep -oE "title: (.+)"`
TITLE=`echo $TITLE | sed 's/title: //'`
TMPFILE="/tmp/editpost-$NUMBER"
echo "$COUNTER) $DATE | $TITLE" >> "$TMPFILE"
echo "$COUNTER) $DATE $TITLE" >> "$TMPFILE"
POSTS[$COUNTER]=$POST
COUNTER=`expr $COUNTER + 1`
done
Expand Down

0 comments on commit f3a4d44

Please sign in to comment.