mysides/archiver.sh
thecookingsenpai 7f3f153429 Added archiver
2024-01-12 21:11:13 +01:00

12 lines
340 B
Bash
Executable File

#!/bin/bash
DSTRING=$(date +%F)
# first, strip underscores
CLEAN=${DSTRING//_/}
# next, replace spaces with underscores
CLEAN=${CLEAN// /_}
# now, clean out anything that's not alphanumeric or an underscore
CLEAN=${CLEAN//[^a-zA-Z0-9_]/}
# finally, lowercase with TR
CLEAN=`echo -n $CLEAN | tr A-Z a-z`
cp allsides.html archive/$CLEAN.html