mikus:
1. i might be wrong but: if you are looking for help on a script you are working on this is not the proper place to ask for it. that is what the sandbox is for. if you are looking for someone to create a script for you then it belongs in the requests section. we can move this thread to the proper section once you can clarify what you are looking for.
2. im not sure if you are asking for help with how to do the syncronizing,
if so rsync will be your best bet. this thread might help point you in the right way:
http://ubuntuforums.org/showthread.php?t=26534
3, if you are asking how to use mkdir to create multiple levels then you want to use the "-p" switch (man mkdir for other options). <edit> jbsnake: the original phrase is forbidden here :wink: </edit>
4. as for the variables i'm not sure at all what you are trying to do. i am going to assume that you are trying to use one variable to create the directory with the date command and then copy the contents of the usb device to that directory.
also, there are links in this section and in the community section to the bash/advanced bash scripting guides that might be able to explain things better.
in the future please try to be a bit more clear about what you are requesting and provide as much information and/or relevant code as possible so we can see the bigger picture of what you are trying to do to best be able to help you (or anyone here for that matter)
### THIS IS AN EXAMPLE ###
# this is not how i would normally go about coding something like this
# but it should give you a rough idea on what you are looking for
#!/bin/bash
CURRENT_DATE="$(date +%m.%d.%Y)";
USBDISK="/mnt/usbdisk/";
BACKUPDIR="/home/user/backup/$CURRENT_DATE/";
# check to see if the backup directory already exists
if [ ! -d $BACKUPDIR ];
then
mkdir -p $BACKUPDIR
fi
cp -R $USBDISK $BACKUPDIR
echo "Done";
exit 0
### END EXAMPLE ###