anyone want to tell me what they think about this?
Code Begin Below
________________
#!/bin/sh
## This is a script that moves our monthly backup from one directory into one created by this script and formatted to keep each month isolated.
echo -e "Month of backup (eg. 200503 is March of 05):\c"
read MONTH
if [ $MONTH ]
then
mkdir /backup/$MONTH
mv /u/data/SPREADSHEET/* /backup/$MONTH
if [ls /backup/$MONTH]
then
echo -e "Backup successfully transfered! Do a little dance!\c"
else
echo -e "Something went wrong! Call for help!\c"
fi
___________________
Code End Above
So, will this work, or am I missing somehting stupid? I'd hate to break my whole system because I forgot a slash or somehting. I think it'll work just fine, but it's always best to get a second opinion. Does it make sense?
________________
#!/bin/sh
## This is a script that moves our monthly backup from one directory into one created by this script and formatted to keep each month isolated.
echo -e "Month of backup (eg. 200503 is March of 05):\c"
read MONTH
if [ $MONTH ]
then
mkdir /backup/$MONTH
mv /u/data/SPREADSHEET/* /backup/$MONTH
if [ls /backup/$MONTH]
then
echo -e "Backup successfully transfered! Do a little dance!\c"
else
echo -e "Something went wrong! Call for help!\c"
fi
___________________
Code End Above
So, will this work, or am I missing somehting stupid? I'd hate to break my whole system because I forgot a slash or somehting. I think it'll work just fine, but it's always best to get a second opinion. Does it make sense?
