Artificial intelligent assistant

How to get the time of several commands with a loop I have this command: time -p sh -c 'command1; command2;' So `command1`and `command2` is executed and I get the real, user and sys time printed on the console. But I want that `command1; command2;` is looped 10 times and then I want to get the time which is used for the two commands.

You can write a simple `for`-loop


time -p bash -c "for (( i=0; i<10; i++ )); do command1; command2; done;"


Note that I used `bash` instead of `sh` for the loop.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 81fcc3b74edd069209d68ae72039e450