I have use a command which outputs the following. .
"Credentials": {
"AccessKeyId": "ASIARKHY6",
"SecretAccessKey": "FHM11kEwWZ",
"SessionToken": "IQoJb3JpZ2luX2",
}
I then have to export each of the 3 following keys. I am doing this manually but would like to write script.
I can pipe the result of the command into a tmp file and then use
cat tmpfile.tmp |grep AccessKeyId
Which outputs : "SecretAccessKey": "FHM11kEwW6sP3Z"
How can I then I select just the text with the second set of "". Which I can then export.