+1 for using exit status in the command-line tools. The other day I wanted to modify a shell script to create a Kafka topic, using bin/kafka-topics.sh --create --topic ...
The tool's behaviour is not very conducive to automation:
- If the topic creation was successful, it prints out a message and exits with status 0.
- If the topic already exists, it prints out a message and exits with status 0.
- If the Kafka broker is down, it prints out an error message and exits with status 0.
- If Zookeeper is down, it keeps retrying.
In this example, an exit status to indicate what happened would be really helpful.
On 10 Mar 2014, at 07:48, Michael G. Noll <[EMAIL PROTECTED]> wrote: