I'm trying to create a make command to collect docker stats into some csv files.
I have defined the command as below, with a while loop to collect every 5 seconds.
docker.memory:
while [ $(gdate -u +%s) -le $(endtime) ]
do
$(shell docker stats --no-stream --format "table ..." > dockerstats)
$(shell sleep 5)
done
However, the command fails with error:
Makefile:xx: *** commands commence before first target. Stop.
Could anyone please advise?