Shell result contains extra data

I’m using a shell in Synchonous mode to get a result from a command which returns the status of an electric shade.

When I issue the command for the Terminal, I get the following response, which is all I want:


But my result from Xojo’s Shell has a bunch of statistics in front of it:

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
100 102 100 72 100 30 800 333 --:–:-- --:–:-- --:–:-- 1133

I know I can parse this extra stuff out, but is there some way to tell the Shell not to provide it? It looks like a verbose mode. Thanks.

The Xojo Shell is not the same as the Terminal. For example environment variables are not available. Do the commands you send to your electric shade use environment variables ? If so you would need to set these in your command.

In this case, all you need to do is strip your response from the beginning to “{”. You may also try the asynchronous mode, the way to get the response is different.

So that’s curl right? You should be able to set an option for it to not print that data.

1 Like

Greg, thanks for pointing me in the right direction. Yes, it’s curl. With a bit of study, I find that the curl uses a “progress meter”. The terminal suppresses this by default. I added -s to suppress it with silent mode and now I get just the result I want.