container=$(docker container ls --format 'table {{.Names}}');
while $container
do
docker exec -u root -it $container netstat -natu | grep -c ESTABLISHED;
done container=$(docker container ls --format 'table {{.Names}}') надо сделать container=$(docker container ls --format '{{.Names}}')#!/bin/bash
container=$(docker container ls --format '{{.Names}}');
for i in $container
do
docker exec -u root -it $i netstat -natu | grep -c ESTABLISHED;
done