Repository URL to install this package:
|
Version:
0.3.30 ▾
|
#!/bin/bash
#
# Works with `boss ps` output to pick out the container ids, and convert them
# into a comma separated list.
#
# Examples:
#
# Stop all containers matching `docker-index-1.2.3` on aws_prod:
# $ boss ps aws_prod --grep docker-index-1.2.3 \
# | select_cid \
# | xargs boss ps stop
#
# Remove all containers from an old hub/reghub release:
# $ boss ps aws_prod --all --grep 'docker-(index|hub)-1.2.3' \
# | select_cid \
# | xargs boss rm
#
grep -v -e '^Host\|^Container\|^Using' | awk '{print $1}' | xargs echo | sed 's/ /,/g'