#!/bin/bash if [ -z "$1" ]; then echo "Expected file ending" exit; fi year=$(date +%Y) day=$(date +%d) cp ./$year/src/template.$1 ./$year/src/day$day.$1