Calculate Shannon entropy of a file Pretty much what is says on the tin. If stdout is a terminal device, produce a nicely formatted human-readable output; otherwise print a pipe-separated list of <filename>|<entropy>.