In the below mentioned code i need to only get the value of access token and write it to another file.
{
"access_token": "dddddddddddddd",
"expires_in": 3600,
"scope": "https://www.googleapis.com/auth/drive.metadata
"token_type": "Bearer"
}
In the below mentioned code i need to only get the value of access token and write it to another file.
{
"access_token": "dddddddddddddd",
"expires_in": 3600,
"scope": "https://www.googleapis.com/auth/drive.metadata
"token_type": "Bearer"
}
s='{"access_token": "dddddddddddddd", "expires_in": 3600, "scope": "https://www.googleapis.com/auth/drive.metadata "token_type": "Bearer"}'
echo ${s:18:14} # prints dddddddddddddd
Or use regular expressions.