Open leorio1 opened 1 month ago
When using commands with the --json flag, a string with "Discovering data..." is prepended, making the output invalid JSON. Adding the --nologo flag does not help:
/usr/sbin/ilorest storagecontroller --url=test --json --nologo --user root Password: Discovering data...Done { "DE00A000": { "Health": "OK", "Name": "HPE MR416i-o Gen11", "State": "Enabled" } } /usr/sbin/ilorest storagecontroller --url=test --json --nologo --user root | jq parse error: Invalid numeric literal at line 1, column 12
Removing the "Discovering data" string results in valid JSON:
/usr/sbin/ilorest storagecontroller --url=test --json --nologo --user root | grep -v Discovering | jq { "DE07C000": { "Health": "Enabled", "Name": "HPE Smart Array P816i-a SR Gen10", "State": "OK" } }
Is there a way to remove "Discovering data" from output automatically?
Evaluating
When using commands with the --json flag, a string with "Discovering data..." is prepended, making the output invalid JSON. Adding the --nologo flag does not help:
Removing the "Discovering data" string results in valid JSON:
Is there a way to remove "Discovering data" from output automatically?