Created
October 24, 2016 00:47
-
-
Save dylanjm/abfe56dfe7015846a6699c4e0d0f5952 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Take all .html files in directory and covert them to .docx files for grading | |
# Check all .html files in directory for the string "Passed all tests with no errors" | |
# This way we can quickly sort files of people who may have had more trouble | |
# Move files that pass into a seperate directory than those with failed tests. | |
str="Passed all tests with no errors" | |
for file in *.html; do | |
pandoc -o "${file%.*}.docx" -s -S "$file" | |
if grep -q "$str" "$file"; then | |
mv "${file%.*}.docx" ../docx/testPass/ | |
else | |
mv "${file%.*}.docx" ../docx/testFail/ | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Teacher's Assistant Grade Organizer
A quick script used to help me grade and organize assignments for several Computer Science courses.
Make this script executable by using
chmod +x gorg.sh
I called it
"gorg"
because it's short for grade-organize.