read

read -p "Enter some data: "
echo $REPLY

read with var export

while true; do read server_id && echo "$REPLY $server_id"; break ;done <<< $(echo "docker service ls") && $server_id