Quote:
Originally Posted by unSpawn
./touchit.sh: illegal option -- m
+ case "$OPT" in
+ getopts s:d:l:th OPT
OK. Just add "m:".
Change the line "while getopts s:d:l:th OPT; do"
to read: "while getopts s:d:l:m:th OPT; do"
sh -x ./touchit.sh -t -m md5 -s /home/tbeehler/Desktop/old/ -d /home/tbeehler/Desktop/new/ -l 3 2>&1 | tee ./touchit.tee
BTW, try switch "-l 4" instead of 3. You'll why see if you use debug mode ("sh -x") like you already did.
|
Ok now I'm getting somewhere, but I have one minor issue left.
I run the command sh ./touchit.sh -t -m diff -s /home/Tbeehler/Experiment/old -d /home/Tbeehler/Experiment/new -l 4 and it gives me a list of the actions that it's going to take such as:
touch -c -d 2006-09-13 10:38:27 /home/Tbeehler/Experiment/new/Reports
touch -c -d 2006-08-30 15:30:23 /home/Tbeehler/Experiment/new/Reports/test report.mdb
touch -c -d 2006-08-30 15:30:23 /home/Tbeehler/Experiment/new/Reports/test2.mdb
touch -c -d 2004-05-05 14:35:18 /home/Tbeehler/Experiment/new/Testing Document.doc
touch -c -d 2004-03-18 12:15:08 /home/Tbeehler/Experiment/new/budget-experiment.doc
touch -c -d 2006-09-13 11:01:27 /home/Tbeehler/Experiment/new/Test
touch -c -d 2006-09-13 11:01:27 /home/Tbeehler/Experiment/new/Test/test
however, it does not change the dates or times. I tried just copying and pasting one of the lines and the date works, but the time does not. I think this is because it's on a Debian 3.1 machine and touch has a new syntax??? I tried using the -m md5 option, but I get errors:
processing /home/Tbeehler/Experiment/old/Reports: failed in buffer_read(fd): mdfile: Is a directory
error processing /home/Tbeehler/Experiment/new/Reports: failed in buffer_read(fd): mdfile: Is a directory
then the list of files it's going to change, but it does not change them either.
I'm glad we are making progress though. You've been very helpful in dealing with this problem.
Thank you in advance!