{"action":"closed","issue":{"url":"https://api.github.com/repos/progrium/bashstyle/issues/16","labels_url":"https://api.github.com/repos/progrium/bashstyle/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/progrium/bashstyle/issues/16/comments","events_url":"https://api.github.com/repos/progrium/bashstyle/issues/16/events","html_url":"https://github.com/progrium/bashstyle/issues/16","id":53573858,"number":16,"title":"Using STDOUT, STDERR, and the other file descriptors","user":{"login":"stuartpb","id":572196,"avatar_url":"https://avatars.githubusercontent.com/u/572196?v=3","gravatar_id":"","url":"https://api.github.com/users/stuartpb","html_url":"https://github.com/stuartpb","followers_url":"https://api.github.com/users/stuartpb/followers","following_url":"https://api.github.com/users/stuartpb/following{/other_user}","gists_url":"https://api.github.com/users/stuartpb/gists{/gist_id}","starred_url":"https://api.github.com/users/stuartpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuartpb/subscriptions","organizations_url":"https://api.github.com/users/stuartpb/orgs","repos_url":"https://api.github.com/users/stuartpb/repos","events_url":"https://api.github.com/users/stuartpb/events{/privacy}","received_events_url":"https://api.github.com/users/stuartpb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-06T22:49:02Z","updated_at":"2015-01-14T22:48:24Z","closed_at":"2015-01-14T22:48:24Z","body":"STDOUT should be easily parseable. Output from STDOUT should avoid using locale-dependent human language wherever possible. (The closer you can match the syntax used by an existing, older utility your output would be piped to, the better.)\r\n\r\nSTDERR should be used for any warnings or errors (since they won't go in a pipe and *will* normally go to the terminal). [See this Stack Overflow question.](http://stackoverflow.com/questions/1430956/should-i-output-warnings-to-stderr-or-stdout)\r\n\r\nThe other file descriptors should maybe have a convention, taking into account how they get used and what bugs there are around them (isn't there something about fd5 not being copied for subcommands or something)? For example, fd6 should be used as the holding descriptor when swapping two other file descriptors.\r\n\r\nI know I used the convention in Plushu that a command's programmatic output was to be output on STDOUT (so it could be captured with command substitution), and the command's *terminal* output (the output from *its* calls' STDOUT) was output on fd3."}}