Skip to content

Instantly share code, notes, and snippets.

# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
@avital-tamir
avital-tamir / awscli-cookbook
Last active May 12, 2016 14:06
AWS Cookbook
# Get a (filtered) list of AWS instances, comma separated:
#
# Here's the reference to the 'describe-instances' command in aws-cli,
# check out the filters section.
# http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html
$ aws ec2 describe-instances --filters "Name=availability-zone,Values=us*" | \
jq -r '.Reservations[] | .Instances[] | "\(.InstanceId)"' | \
tr '\n' ','