17

What's the difference between export and setenv?

19

there is none but:

setenv is the name of the command in the *csh family of shells

export is the name of the command in the "other" family of shells (ash, bourne, bourne again, zsh)

and, ok, the syntax is slightly different. but other than that? none.

  • 1
    Are we allowed to consider that bastard c-shell syntax from Berkeley "deprecated" yet? – msw Mar 5 '11 at 4:39
  • 1
    no: tcsh.org/Welcome – akira Mar 5 '11 at 6:19
  • 1
    it's good to be aware that in bourne (unlike bash) you can't do export VARIABLE=VALUE. Instead you need to do VARIABLE=VALUE\n export VARIABLE – Mike Vella Apr 4 '17 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.