You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
264 B
Bash

#!/bin/sh
day="$1"
format="$2"
num="$3"
test -z "${num}" && num=1
test -z "${day}" && day=$(date)
test -z "${format}" && format="%a, %b %-d"
IFS=
while read line; do
echo "$num|$(date +$format -d $day)|$line"
num=$((num+1))
day="$day +1 week"
done