I'm trying to run a for loop inside of bash -c
so I can time it. This code writes 23 every time. How can I make it iterate through the numbers?
time bash -c "for i in {0..23}; do echo $i & done"
This code works, but I need to time the whole operation:
for i in {0..23}; do echo $i & done
The echo
command is just for simplicity. I am really trying to run dd
, that's why I background the process with &