3 #check if ppn divides p
6 #parse the arguments to extract the ppn number
7 IFS
=' ' read -r -a array
<<< "$*"
10 if [ $ppn_found -eq 1 ] ; then
15 if [[ $i == *"ppn"* ]]; then
16 ppn
=$
(echo $i | cut
-d'n' -f 2)
27 #now parse the arguments to run to find the p number
31 IFS
=' ' read -r -a array
<<< "$*"
32 for i
in "${array[@]}"
34 if [ $p_found -eq 1 ] ; then
39 if [[ $i == "+p"* ]]; then
40 p
=$
(echo $i | cut
-d'p' -f 2)
50 #if ppn is zero, don't do division test
51 if [[ $ppn -eq 0 ]] ; then
54 #check if p divides ppn
56 if [[ $p -ne 0 && $m -eq 0 ]] ; then
57 #if it divides run the test
60 #if it does not divide, give a warning and do not run
61 echo "Warning: ppn does not divide p. Skipping the test."