1

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

Ashutosh
  • 518
  • 7
  • 20
AFS
  • 1,433
  • 6
  • 28
  • 52

0 Answers0