jpmens / jo

JSON output from a shell
http://jpmens.net/2016/03/05/a-shell-command-to-create-json-jo/
Other
4.66k stars 156 forks source link

Add option -o outfile #189

Closed yashi closed 2 years ago

yashi commented 2 years ago

This PR is to add a new option -o outfile.

While adding it, I found that meson is generating a warning about run_command. This PR includes a small fix for that as well.

jpmens commented 2 years ago

Thank you for your submission!

Can you tell us why you feel this option is necessary instead of, say, using output redirection?

yashi commented 2 years ago

Hi,

Thank you for a nice tool!

As I wrote in a commit message some tools exec without shell, such as CMake in my case. without any shell, you can't use redirection, '>', to create a file. https://cmake.org/cmake/help/latest/command/execute_process.html#execute-process

jpmens commented 2 years ago

I missed the commit message, sorry, and thank you for the explanation.

jpmens commented 2 years ago

Merged, thanks!