title: How to get a specific string from a variable using Shell Script
body: <p>I have a code which returns an access token string.</p>
  
  <pre><code>#!/bin/bash
  token=$(curl --globoff -X POST "https://example.com/token" -F 'grant_type=client_credentials' -F 'client_id=d86fc9b690963b8dda602bd26f33454r457e9024a4ecccf4c3bbf66ffcbc241b' -F 'client_code'='ff148c56118728b62c9f2ew3e4r009a7a1c645276b70611fa32fa055b9944934')
  echo "$token" &gt; Token.txt
  </code></pre>
  
  <p>The output given by this command is :</p>
  
  <pre><code>{
      "access_token": "5048e7d38e73b4a809a4fcb219b63ae34f34f43f83d6663ffd777203afb5654ab",
      "token_type": "bearer",
      "expires_in": 7200
  }
  </code></pre>
  
  <p>ie. the variable <code>token</code> contains the above result. My question is how to get the access token <code>5048e7d38e73b4a809a4fcb219b63ae34f34f43f83d6663ffd777203afb5654ab</code> alone from this and save to another variable.</p>