1

They both seem to do pretty much the same thing, but what are the advantages of using one over the other?

Sarke
  • 507

1 Answers1

2

The advantage is portability.

MYVAR=1 /bin/whatever

is syntax accepted by shells in the Bourne tradition and others, e.g. rc, sh, ksh, bash, and zsh, but not by others such as csh, tcsh.

icarus
  • 17,920