Shell variables are known only to the shell in which they were created. Environment variables are global variables and are independent of the shell.
Environment variables stay in effect regardless of what shell is used.
On a UNIX system, some shell and environment variables are predefined by the system. Also, environment variables are usually represented by uppercase names whereas shell variables are represented by lowercase names. A shell variable with the same name as an environment variable still has the same function. Remember last n commands. Prevents overwriting an existing file during redirection.