| 12345678910111213141516171819202122 | #!/bin/bash# Usage: ./check_access_token.sh ACCESS_TOKEN# Returns non-zero exit code if ACCESS_TOKEN is invalid.if [ "$#" -ne 1 ]; then  echo "Please provide an access token to $0" 1>&2  exit 1fitoken=$1set -efunction on_error {  echo "Failed to validate GitHub access token!" 1>&2  exit 1}trap on_error ERRtest_response=$(curl -s https://api.github.com/?access_token=${token})echo $test_response | grep -ivq "bad credentials"echo $"GitHub access token is valid."
 |