sajad torkamani

In a nutshell

The -a option automatically exports any variable you define instead of requiring you to use export for each one.

Without -a (default behaviour)

If you do:

FOO=bar

FOO will only exist for the current shell process. Other shell processes cannot access it.

With -a

If you do:

FOO=bar

FOO will automatically be exported so that any shell processes launched after the process that defined FOO can also access FOO.

Tagged: Bash