cowsay-blog / cowpost

@ 4f7b25cda67302717e97ab27d6f0106cf3c9b082 | history


#!/bin/bash

HERE=$(pwd)
POSTPATH="$HERE/posts"
COWPOSTPATH="$HERE/cowposts"
INFILE="${@: -1}"

(date "+%Y-%m-%d %H:%M:%S" && cowsay "${@:1:($#-1)}" < $INFILE) > "$COWPOSTPATH/$INFILE.cowpost";

mv $INFILE $POSTPATH;