0

I have the following code trying to calculate how much time it takes in milliseconds to build a docker container. However I am facing syntax error and command not found issue, running bash script bash pipeline.sh

#!/bin/bash
echo 'Initiating pipeline'
cd /home/switch-approach/server-c
start=date+'%s%3N'
sudo docker build -t server-c .
end=date+'%s%3N'
echo "duration: $((duration=end-start)) seconds."

Retrieving error date+'%s%3N' command not found operand expected syntax error start

0 Answers0