Forum Discussion
apresti12
Nimbostratus
Feb 28, 2017500 Error When Posting Bash Command - PowerShell
Does anyone know why a multi argument bash command fails but a single argument command does not fail? It almost acts as if the "md5sum" command in this example is ran without taking into consideratio...
Feb 28, 2017
This one works for me:
[nielsvs@localhost ~]$ curl -sk -u apiuser:secret -H 'Content-Type: application/json' -X POST -d '{"command": "run", "utilCmdArgs": "-c \"md5sum /shared/images/BIGIP-13.0.0.0.0.1645.iso\""}' https://10.23.92.5/mgmt/tm/util/bash | jq
{
"kind": "tm:util:bash:runstate",
"command": "run",
"utilCmdArgs": "-c \"md5sum /shared/images/BIGIP-13.0.0.0.0.1645.iso\"",
"commandResult": "70c21457c96b8a1381a0efc62fcb94f2 /shared/images/BIGIP-13.0.0.0.0.1645.iso\n"
}
[nielsvs@localhost ~]$
Maybe you should use the extra quotes when using the '-c'?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects