Hey guys, I’m new to bash scripting/coding and don’t know how to shorten execution time in my code. I’m going through everything I can in the beginner category writing in python 3.6, then powershell, then bash. I got it to work on the first two, but I don’t know enough BASH to simplify my code. Here it is for INTEST:
read n k
for i in $(seq 1 $n); do
read x a=$(( x % k )) if [ "$a" = "0" ]; then ans=$(($ans+1)) fi
Any help or suggestions would be greatly appreciated.