|
@@ -53,10 +53,8 @@ for i in $PROFILES; do
|
|
|
echo "======================================================================================"
|
|
|
export AWS_PROFILE=$i
|
|
|
|
|
|
- set +e
|
|
|
${AWS} sts get-caller-identity > /dev/null 2>&1
|
|
|
RC=$?
|
|
|
- set -e
|
|
|
|
|
|
if [[ $RC -eq 0 ]]; then
|
|
|
echo "GetCallerIdentity (AssumeRole Test) for $i OK"
|
|
@@ -70,8 +68,8 @@ for i in $PROFILES; do
|
|
|
done
|
|
|
|
|
|
echo Combining
|
|
|
-(cat *.tmp | head -1; cat *.tmp | grep -v 'user,arn,user_creation_time' | sort -u) > combined.tmp2
|
|
|
+{ cat *.tmp | head -1; cat *.tmp | grep -v 'user,arn,user_creation_time' | sort -u; } > combined.tmp2
|
|
|
# Only the columsn we want. Since format is likely to change, this may be a bad idea
|
|
|
echo cutting
|
|
|
-cut -d, -f1,2,5,6,9,10,11,14,15,16,19,20,21,22 combined.tmp2 > combined.csv
|
|
|
+cut -d, -f1,2,5,6,8,9,10,11,14,15,16,19,20,21,22 combined.tmp2 > combined.csv
|
|
|
rm -f *.tmp *.tmp2
|