cowsay-blog / cowpost

@ ccb9dcb15a6d6ecaf1f2e46476ad19cd77aeb400 | 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;