Linux między zmiennymi subshell
One way:
FOO=bar sh -c 'first && second'
FOO=bar BAZ=quux sh -c 'first && second'
Another way to do this is to create the variable and export it inside a subshell. Doing the export inside the subshell ensures that the outer shell does not get the variable in its environment:
( export FOO=bar; first && second )
DreamCoder