ORNL / DataFed

A Federated Scientific Data Management System
https://ornl.github.io/DataFed/
Other
18 stars 14 forks source link

terse or concise mode of output for CLI #576

Open ssomnath opened 3 years ago

ssomnath commented 3 years ago

Since bash is either challenging or ugly to do complex parsing and decision making, certain CLI commands should optionally be able to return only the most crucial piece(s) of information that can easily be handled in bash. For example data create should return just the ID of the record if one turned on the concise flag.

JoshuaSBrown commented 1 year ago

I don't know how I feel about this. I think what might be preferable is to return a JSON object that can be parsed using the Linux jq command. That way if you have mastery of that one command you should be able to do most things.

dvstans commented 1 year ago

We should seek the advice of potential users on issues like this. I would prefer JSON, but other users may prefer simple bash scripting where json parsing would be complex. I think it would be best to support multiple modes (JSON output is already available)