1 Apr 2011 05:41
Bash String
Jackman <kd7nyq <at> gmail.com>
2011-04-01 03:41:16 GMT
2011-04-01 03:41:16 GMT
Here's another crazy question: I'm writing a script that deals with the creation of backup files. It seems like it would be wise to come up with a file name ahead of time in the off chance that my generation criteria (the date and time) changes while the script is running. In short, the script is as follows: Come up with file name. Create the archive from $SRC. If older files exist, compare the new file and the most recent files using md5sum. If the files don't differ, delete the new file. This is the line that generates to the filename: NEW_FILE="$($DEST/www_$(date +\%Y\%m\%d-\%H\%M).tar.bz2)" I thought this just generated and assigned a string. Why do I get the following response? -bash: /var/chroot/home/content/07/7224307/backups/www_20110331-2029.tar.bz2: No such file or directory Why doesn't bash does take it as a string of characters? BTW, I think it's worth including the reason why I'm going to the method above. The old script is as follows:(Continue reading)
RSS Feed