I run a lot of rsync scripts to keep my data in tact across storage media.
This question is not about that script, but about a script I use to drop a date-stamp file on the drive after I sync it.
It works fine, but I noticed when running it from Midnight Commander that the sub shell stays active. I tried adding "done" at the end of the script, but that doesn't change it.
How can I get it to exit the shell?
Code: Select all
#!/bin/bash
MYDIR=$(cd `dirname $0` && pwd)
cd $MYDIR
DATE=$(date +"%m%d.%H%M")
cat > $MYDIR/ALL-$DATE.log
done