I'm looking to write a bash script that will not progress until the log of a container states "[services.d] done."
Example:
#!/bin/bash
while [ docker logs container | grep "[services.d] done." ] = "false";
do
sleep 1
echo "working..."
done
I'm looking to write a bash script that will not progress until the log of a container states "[services.d] done."
Example:
#!/bin/bash
while [ docker logs container | grep "[services.d] done." ] = "false";
do
sleep 1
echo "working..."
done
Grep will return false if it will not find the string, so try just:
#!/bin/bash
while ! docker logs container | grep -q "[services.d] done.";
do
sleep 1
echo "working..."
done