I am trying to retrieve cf oauth token and use it to trigger another API via PCF Tasks scheduler . I am able to trigger API with no authentication , But when I try to parameterize oauth token I am getting an error that '''[ERR] bash: cf: command not found'''
Command : curl -X POST -H "Authorization: $(cf oauth-token)" -H "Content-Type: application/json" https://somehost.com .
Please suggest