I need to measure the script execution time in milliseconds, I've written some test script but it's not working:
#!/bin/bash
start=date +%s%3N
for i in {1..4};
do
echo "i:$i"
sleep 1
done
end=date +%s%3N
echo $($start -$end)
The +%s%3N
is not found