In a given shell, normally I\'d set a variable or variables and then run a command. Recently I learned about the concept of prepending a variable definition to a command:
FOO=bar bash -c 'somecommand someargs | somecommand2'