I have a script, which starts the execution of multiple C++-programs. I have to execute those with sudo, as they use some "restricted" linux libs/files(probably not the right nomenclature, but you get what i mean). Now i would like to write a shell-script which calls those binaries one after the other, but i do not know how to do this:
#!/bin/bash
./main a > out/output2DFloat.csv
./main a a > out/output3DFloat.csv
./main a a a > out/output2DDouble.csv
./main a a a a > out/output3DDouble.csv
and call this with sudo? Or append Sudo before each and call it with sudo...
My fear is, that the sudo timer runs out, before even one is finished, which would lead to big problems, if the next ones then need sudo-rights ...