Setting an environment variable before a command in Bash is not working for the second command in a pipe

FOO=bar bash -c 'somecommand someargs | somecommand2'

Leave a Comment