Skip to content
Permalink
Browse files

fix password script

  • Loading branch information
mchyzer committed Oct 2, 2020
1 parent 6f594f9 commit 368b3b6cf32b1176f78e7e021cd171ac75f83698
Showing with 1 addition and 1 deletion.
  1. +1 −1 internal/passwordsToSpreadsheet.sh
@@ -1,3 +1,3 @@
#!/bin/bash

aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | select(.State.Name!="terminated") | select((.Tags[]|select(.Key=="env")|.Value) =="training")] | .[] | .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], "\011student\011", m[2], "\011\011\011ssh -L 8443:localhost:8443 -l student ", m[1]; }'
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | select(.State.Name!="terminated") | select((.Tags[]|select(.Key=="env")|.Value) =="grouperTraining")] | .[] | .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]; }'

0 comments on commit 368b3b6

Please sign in to comment.
You can’t perform that action at this time.