simple/tiny/savedate

7 lines
110 B
Bash
Executable File

#!/bin/sh
now=`date '+%Y-%m-%dT%H:%M:%S'`
for i in "$@"
do
mv "$i" "$i.$now" && cp -p "$i.$now" "$i"
done