Hi ,
I am trying to run curl command on windows command prompt . I am getting following error at 'rex' in the search query
curl -k -u admin:pass -d search=" search (host=xxxx-xxxx-xxxx) | rex field=_raw mode=sed \"s/abc/'/g\" " -d "output_mode=csv" http://localhost:8089/servicesNS/admin/search/search/jobs/export
I am getting following at 'rex'
'rex' is not recognizable command
Thanks,
Santosh
It sounds like Windows is processing the pipe character within the search query instead of passing it on as part of the curl command. Try escaping the pipe.
curl -k -u admin:pass -d search=" search (host=xxxx-xxxx-xxxx) ^| rex field=_raw mode=sed \"s/abc/'/g\" " -d "output_mode=csv" http://localhost:8089/servicesNS/admin/search/search/jobs/export