40 likes | 115 Views
Scripting to Grade Homework. user. 2525101010s0aq.sh cat 2525101010s0arq.txt >> ../$1/Soda/FEEDME. append. File Hierarchy. 2525101010s0arq.txt 25 25 10 10 10 s0 a q. F14_Hmwk user Soda FEEDME SodaMachine.jar scripts 2525101010s0aq.txt 2525101010s0aq.sh 252525s0arq.txt
E N D
user 2525101010s0aq.sh cat 2525101010s0arq.txt >> ../$1/Soda/FEEDME append File Hierarchy 2525101010s0arq.txt 25 25 10 10 10 s0 a q • F14_Hmwk • user • Soda • FEEDME • SodaMachine.jar • scripts • 2525101010s0aq.txt • 2525101010s0aq.sh • 252525s0arq.txt • 252525s0arq.sh • arq.txt • arq.sh • aR0q.txt • aR0q.sh • run_script.sh # run_script.sh if [ -e FEEDME ] then rm FEEDME fi touch FEEDME tail -f FEEDME | java -jar $1
Execute Program user/Soda $ ../../scripts/run_script.sh Sodamachine.jar executes: tail -f FEEDME | java -jar SodaMachine.jar • at this point the program is running but getting its input from the • file FEEDME. • FEEDME is given more lines every time we execute one of the scripts • 2525101010s0aq.sh • 252525s0arq.sh • arq.sh • aR0q.sh
Execute Scripts F14_Hmwk/scripts $ ./2525101010s0aq.sh user These scripts are run individually and this allows me to look at the output after each sale or admin transaction before I test another sale.