From 368b3b6cf32b1176f78e7e021cd171ac75f83698 Mon Sep 17 00:00:00 2001 From: Chris Hyzer Date: Fri, 2 Oct 2020 12:51:38 -0400 Subject: [PATCH] fix password script --- internal/passwordsToSpreadsheet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/passwordsToSpreadsheet.sh b/internal/passwordsToSpreadsheet.sh index a971cda..0c54674 100644 --- a/internal/passwordsToSpreadsheet.sh +++ b/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]; }'