How To Set Get and Change Bash Environment Variable?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/set-get-change-bash-environment-variable/
PINTEREST
PINTEREST
INSTAGRAM

Bash shell is used for a lot of things in Linux systems. Most of the applications run with bash. Bash is a shell but provides an environment that can be used to programming. Variables are core of the programming. Bash provides variables too. There are default variables as well as user defined variables.

Get Existing Bash Environment Variables

Bash environment variables created at the initialization of the shell.

  • We provide env command to get list of environment variables.

Create and Set Variable

Now we will create a variable to hold count of operations.

Get Variable

We can get created variable like below.

Change Variable

We will get count variable and change it. Than save the variable

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/set-get-change-bash-environment-variable/
PINTEREST
PINTEREST
INSTAGRAM

LEARN MORE  Linux uniq Command Tutorial With Examples

Leave a Reply

Your email address will not be published.