I'm not sure from where I gained the knowledge, but I was fairly certain that one could capture the ouput of a command in bash and store it in an environment variable, and I've finally discovered how one can do that:




  # execute 'find' and store results in VAR

  # search for filenames which end with the letter "h"

  VAR=$(find . -name "*h")