curl -X POST \ -H "Authorization: bearer
u8dhr7g4a" \ -H "Cache Control: no-cache" \ -F "app_package=@\"/opt/splunk/etc/apps/learned\\""\ --url "https://appinspect.splunk.com/v1/app/validate"
The command I used successfully is similar, but lacks the backslash characters and has a full path to the app.
curl -X POST -H "Authorization: bearer 3wiO-MAo8fSb09s" -H "Cache-Control: no-cache" -F "app_package=@\"/opt/splunk/etc/system/static/app-packages/SA_mvstats.spl\"" --url "https://appinspect.splunk.com/v1/app/validate"
Try entering the command on a single line (I use notepad++ to build the line then paste it into the CLI).