How to update a command-line program using Homebrew?
Simply no. Only Apple can update programs in /usr/bin etc.

However you can make your scripts find the program from Homebrew first. You do this by making your $PATH have /usr/local/bin (which is where Homebrew puts links to the executables) earlier in the $PATH than OS supplied programs.