export command

Is there any difference between these 2 commands :-

export var="a"

and

var="a"
export var

i guess the only thing it would have affected is that whether variable is exported at all or not :wink: ...and for that ypu can check by getting/spawning few more shells and checking if the variable exported is available or not..

bottomline:both the commands will serve the same purpose :slight_smile:

Very old shells do not allow the first form.