#!/bin/sh ecs_list_task_definitions.sh | while read tdef; do aws ecs describe-task-definition --task-definition "$tdef" | tee "$tdef.json" done