Linux - Explain how to get/set an environment variable from a program

Explain how to get/set an environment variable from a program.

In C programming language:

An environment variable can get using the function getenv().

An environment variable can set using the function getenv().

In Shell scripting:

The environment variable itself can be used as:
MAIL_DELIVERY_COMPLETE=0

PATH=$PATH:/home/myuser/*.jar
Linux - Describe how a parent and child process communicates each other
Describe how a parent and child process communicates each other - The inter communication between a child process and a parent process........
Linux - What is a Daemon?
What is a Daemon? - Daemon is the short form for Disk and Execution Monitor......
Linux - What is 'ps' command for?
What is 'ps' command for? - The shortage for “process status” is ps.......
Post your comment