by Sean Scott.
Hi Ken,
Can you tell me how to modify the script to use --courseshortname instead of --courseid
I'm assuming the $i needs to be modified since course shortname is alpha numeric. Just not sure how to do it.
Thank you for your help.
This is the script that works with the --courseid
#!/bin/bash
#
cd /ctdlc/moodle/admin/cli/;
echo pwd
for i in $(cat /ctdlc/moodle/admin/cli/2017Summer1.txt)
do
echo "Course ID in que:" $i;
php backup.php --courseid=$i --destination=/mnt/nas/archives/
done
ls -l /mnt/nas/;
echo 'Done!';
I would like to use --courseshortname
#!/bin/bash
#
cd /ctdlc/moodle/admin/cli/;
echo pwd
for i in $(cat /ctdlc/moodle/admin/cli/shortnameSU17.txt)
do
echo "Course Shortname in que:" $i;
php backup.php --courseshortname=$i --destination=/mnt/nas/shortnameSU17/
done
ls -l /mnt/nas/;
echo 'Done!';