I did multiple code blocks just 5 minutes ago. Quite normal way to do in minimum level when giving usage examples.
Just an example
sudo nano /usr/local/bin/docker-ips
#!/bin/bash
# show IPs of containers/gateways and network ID (short form)
if [ $# -eq 0 ]; then
containers=$(docker ps -q)
else
containers=$(docker ps -qf "name=$1")
fi
for cid in $containers; do
cname=$(docker inspect --format '{{.Name}}' "$cid" | sed 's|/||')
echo "=== $cname ==="
docker inspect -f '{{range $net,$v := .NetworkSettings.Networks}}Verkko: {{$net}}
Kontin IP: {{$v.IPAddress}}
Gateway: {{$v.Gateway}}
VerkkoID: {{printf "%.12s" $v.NetworkID}}{{"\n"}}{{end}}' "$cid"
done
sudo chmod +x /usr/local/bin/docker-ips
I don’t use rich editor anywhere but in my phone, but normally we can’t get empty lines without <br>
so then there should be meaningless text