To grep two words on a file
grep -E 'RoleName|RoleId' /tmp/roles.txt
grep -e RoleName -e RoleId /tmp/roles.txt
To grep Before and after lines from a file
grep -B1 -A1 RoleId /tmp/roles.txt
To find the IAM Roles on a AWS account
aws iam list-roles > /tmp/roles.txt
No comments:
Post a Comment