I wrote a script which does basically this (takes a service name and a master password, concats them, and returns the SHA256 sum). It has a few added features, like checking the master password against a stored hash, flags for adding a symbol, capital letter, etc, and remembering your preferences for whether to use one.
You can find it on my github: https://github.com/alexbecker/useful-scripts/blob/master/gen...