Skip to content
Permalink
202109
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
@mchyzer
Latest commit c1148a7 Feb 12, 2021 History
1 contributor

Users who have contributed to this file

4 lines (2 sloc) 448 Bytes
#!/bin/bash
aws ec2 describe-instances --filters "Name=tag-key,Values=env" --filters "Name=tag-value,Values=grouperTraining" |jq '[.Reservations | .[] | .Instances | .[] | select(.State.Name!="terminated") ] | .[] | .InstanceId' | xargs -n 1 -I{} aws ec2 get-console-output --instance-id {} | gawk 'match($0, /abcdefg12345678,([0-9.]+),([0-9a-zA-Z]+),/, m) { print m[1], ",student,", m[2], ",ssh -L 8443:localhost:8443 -l student ", m[1]; }'