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
  • 488
  • 5
  • 18
AFS
  • 1,393
  • 4
  • 26
  • 51

0 Answers0